Call Android app from web page

Hi Is it possible to call an Android application from a web page that I display in a phone browser for a user. I know this is possible from another Android app using intentions. But I'm not sure if this is possible from a webpage.

Thanks in advance.

+3
source share
2 answers

Intent filters with a category BROWSABLEallow you to run an application using a URI scheme. Inside <activity>add:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="myprotocol" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

and configure the action and categories as you want, and change the schema to something specific to your application.

Then on your web page you can link to your application using

<a href="myprotocol://">test link</a>
+2
source

Source: https://habr.com/ru/post/1774393/


All Articles