android - 如何触发深度链接?
问题描述
在我的应用中,我启用了深层链接,例如:
<activity android:name="com.example.android.DeepLinkActivity">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="www.bartsimposon.net" android:scheme="https"/>
<data android:pathPattern="/kwitchiboo/.*\\.html"/>
</intent-filter>
</activity>
当我进入智能手机浏览器时,我期待
https://www.bartsimpson.net\kwitchiboo\something.html
触发我的DeepLinkActivity
?
解决方案
您必须单击此链接,而不是在某些浏览器的地址字段/多功能框中手动输入。在您的手机上导航到此站点/主题并尝试单击此处:
https://www.bartsimpson.net/kwitchiboo/something.html
在您的应用程序安装和第一次此类链接点击系统会询问您要在哪个应用程序中打开 URL、浏览器或您的应用程序。还有“总是”和“只有一次”选项
推荐阅读
- java - Spring Boot - 从另一个微服务获取数据
- javascript - 如何在 Salesforce Trailhead 中实现类的更改样式
- html - 如何在 perl 中对 HTML DOM 元素进行快照
- javascript - Angular patchvalue 返回 ERROR DOMException:尝试使用不可用或不再可用的对象
- read-the-docs - ReadTheDocs 搜索:'未能创建查询:路径 [sections] 下的 [nested] 嵌套对象不是嵌套类型'
- javascript - 如何在 reactjs 中添加下拉菜单?
- python - 'OrderItem' 对象没有属性 'Product'
- python - 无法在 mac 上安装 psycopg2
- vuetify.js - 当我单击任意位置时,Vuetify v-select 不会关闭
- ios - 重新生成临时配置文件、分发证书和 APNS 证书