我可以在一个网站上添加一个链接,例如"navigon://",在iOS设备中,如果安装了Navigon应用程序,它将打开它.
是否有类似的简单方法从Android网站(假设已安装)打开应用程序?
Dea*_*on1 20
Android深层链接:为您的清单添加一个intent过滤器
<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_title_viewgizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
<!-- note that the leading "/" is required for pathPrefix-->
<!-- Accepts URIs that begin with "example://gizmos”
<data android:scheme="example"
android:host="gizmos" />
-->
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
https://developer.android.com/training/app-indexing/deep-linking.html
| 归档时间: |
|
| 查看次数: |
93787 次 |
| 最近记录: |