The way to start the app in the browser is as follows:
Add information about Intent-filter to the activity that needs to jump:
<intent-filter>
<data android:scheme= "Com.example.scheme"/>
</intent-filter>
Examples are as follows:
<activity android:name= ". Browactivity ">
<intent-filter>
<action android:name= "Android.intent.action.VIEW"/>
<category android:name= "Android.intent.category.DEFAULT"/>
<category android:name= "Android.intent.category.BROWSABLE"/>
<data android:scheme= "Com.example.scheme"/>
<action android:name= "Android.intent.action.VIEW"/>
</intent-filter>
</activity>
Then add the following link to HTML: <a href= "My.special.scheme://other/parameters/here" >
After you enter the app, you can use Getintent () to get information about what the URL carries:
eg:http://twitter.com/status/1234
Uri data = Getintent (). GetData ();
String scheme = Data.getscheme (); "http"
String host = Data.gethost (); "Twitter.com"
list<string> params = data.getpathsegments ();
String first = params.get (0); "Status"
String second = Params.get (1); "1234"