1.在AndroidManifest中配置HTML页面跳转的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:scheme="myscheme"
android:host="myhost">
</intent-filter>
2.在HTML添加标签:
<a href="myscheme://myhost/这里加要传递的参数"> 打开我的app </a>
注意:
其中android:scheme设置的内容不能为大写,否则无法调起。
HTML 标签中 a 标签必须是完整的myscheme://myhost/。