在Play商店中启用该应用后,Android应用链接不起作用

问题描述 投票:5回答:1

我已经基于以下链接实现了Android应用程序链接。

https://developer.android.com/studio/write/app-link-indexing.html

https://developer.android.com/training/app-links

我已将资产链接文件托管到我们的域https://ourdomain/.well-known/assetlinks.json中而且我已经使用https://developers.google.com/digital-asset-links/tools/generator验证了这一点以及来自android studio的“应用链接助手”。并通过两种方式获得了验证状态。

现在,当我生成签名的版本并通过Google驱动器链接对其进行测试时。 Android应用程序链接按预期方式工作(单击链接后,应用程序将打开,而无需打开适用于android 6.0及更高版本的消歧对话框)。

上载相同版本以播放商店后,它不起作用。

下面是清单文件中使用的代码。

            <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="<ourdomain>" />
        </intent-filter>

编辑:Android应用程序链接在将其上传到Play商店后的一天中按预期工作。并在第二天再次开始打开消歧对话框。知道可能是什么问题吗?

来自Play商店的相同版本在不同的日子给了我两个不同的状态,分别为询问总是

enter image description hereenter image description here

adb shell dumpsys程序包domain-preferred-apps

当我运行上述命令时

android react-native android-studio react-native-android android-app-links
1个回答
0
投票

我遇到了同样的问题,因为它在未上传到Playstore的签名apk上运行正常。

后来我发现我需要从PlayConsole添加SHA256密钥通过转到Play控制台中的“应用程序信息中心”然后发布管理->应用签名在那您会找到SHA-256证书指纹在https://ourdomain/.well-known/assetlinks.json的assetlinks.json中使用此SHA-256,然后从playstore重新安装该应用对我来说一切正常[]

© www.soinside.com 2019 - 2024. All rights reserved.