在Play商店中启用该应用后,Android应用链接无法正常工作

Pru*_*hvi 5 android android-studio react-native react-native-android android-app-links

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

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

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

我已经将assetlinks文件托管到我们的域https://ourdomain/.well-known/assetlinks.json中, 而且我已经使用https://developers.google.com/digital-asset-links/tools/generator 和从android studio的应用链接助手也。并通过两种方式获得了验证状态。

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

将相同版本上传到Play商店后,它不起作用。

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

            <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>
Run Code Online (Sandbox Code Playgroud)

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

Play商店中的同一版本在不同的日子给了我两个不同的状态,分别是AskAlways

在此处输入图片说明 在此处输入图片说明

adb shell dumpsys程序包domain-preferred-apps

当我运行上面的命令

小智 9

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

后来我发现我需要从 PlayConsole 添加 SHA256 密钥通过转到 Play Console 中的应用程序仪表板然后发布管理-> 应用程序签名,您会在那里找到 SHA-256 证书指纹在 assetlinks.json 中使用此 SHA-256 https://ourdomain/.well-known/assetlinks.json然后从 Playstore 重新安装应用程序它对我来说开始工作正常