h5页面唤起app 某个特定页面

h5页面唤起app 某个特定页面实际上是走了不少弯路还有阅读了不了大牛的博客,为了让你们少走弯路,我就总结下我概括总结方法吧android

android app内页面scheme配置
<activity
android:name="com.example.test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<data
android:host="my.host.com"
android:path="/get/info"
android:scheme="m" />app

<category android:name="android.intent.category.DEFAULT" />get

<action android:name="android.intent.action.VIEW" />博客

<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
android app内原生页面取值
Uri uri = getIntent().getData();
if (uri != null) {
id = uri.getQueryParameter("ID");
}

string

h5页面配置
<a href="m://my.host.com/get/info?ID=10000" >点击打开目标app</a>it

相关文章
相关标签/搜索