【发布时间】:2018-11-01 16:34:34
【问题描述】:
在我添加元数据标签之前,我的 Android 应用链接功能无法使用:
<meta-data
android:name="asset_statements"
android:resource="@string/asset_statements"/>
这是我阅读here 和here 的建议。但是Google official documentation 没有提到这一点。
那么......真的需要它还是我做错了什么?
(当我提到应用链接不起作用时,我应该注意深层链接有效,但 Android 仍显示“默认应用选择器对话框”)
更新 #1:
我正在测试 Android 8.1。我已经上传了.well-known/assetlinks.json 文件。这是我处理深层链接的活动:
<activity
android:name=".LinkDispatcherActivity"
<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:scheme="http" />
<data android:scheme="https" />
<data android:host="@string/www_app_domain" />
</intent-filter>
</activity>
【问题讨论】:
-
我没有这样的标签,也没有发现任何问题。您在哪个 Android 版本上进行测试?你的意图过滤器是什么样的?您是否已在服务器上完成必要的设置以使验证成功?
-
查看我的更新详情