WebView或浏览器通过Scheme调起App:
一、 在要调起的app中的AndroidManifes.xml文件中,在要被其它应用启动的Activity标签中添加如下拦截器:
<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:host="me.ricky.sample"
android:path="/userDetails"
android:port="8080"
android:scheme="xieyi" />
</intent-filter>
可以只写一个host和scheme,如下:
<data
android:scheme="xieyi"