我已将 assetlinks 文件托管到我们的域 https://ourdomain/.well-known/assetlinks.json 并且还使用验证了这一点https://developers.google.com/digital-asset-links/tools/generator https://developers.google.com/digital-asset-links/tools/generator以及来自 android studio 的 App Links Assistant 并从这两种方式获得了验证状态。
但是当我共享调试 APK 进行测试时,它总是在浏览器中打开。
我还尝试在应用程序商店上传并从那里下载进行测试,但它总是在浏览器中打开。
注意:对于调试构建,使用了我的笔记本电脑 SHA-256,一旦 Play 商店上的应用程序将托管资产链接文件上的 SHA(通过转到 Play 控制台中的应用程序仪表板然后发布管理 --> 应用程序签名获得 SHA-256)更改为我们的域 https ://ourdomain/.well-known/assetlinks.json
以下是清单文件中使用的代码。
<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="https"
android:host="abc.test.com" />
</intent-filter>
就我而言,该应用程序可以在 android 11 中运行,但当使用 android studio 编译和构建该应用程序时,它无法在 android 12 中运行。
我测试了生产应用程序;它与应用程序链接配合得很好。
对于开发构建,我必须转到应用程序信息 -> 默认打开 -> 添加链接 -> 选中所有可用链接
这似乎只发生在开发版本中;从 Google 应用商店安装的应用程序会自动选择所有链接。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)