android - Start activity from HTML -


i want call activity html page in android application. put

<a href="testactivity.java">test  activity</a> 

use <intent-filter> <data> element. put inside <activity> in androidmanifest.xml:

<intent-filter>     <data android:scheme="my.special.scheme" />     <action android:name="android.intent.action.view" /> </intent-filter> 

then, in web app can put links like:

<a href="my.special.scheme://other/parameters/here"> 

when user clicks on link, app launched automatically (because 1 can handle my.special.scheme:// type uris). downside if user doesn't have app installed, they'll error.


Comments