【问题标题】:Android app link not working after the application is made live in play store应用程序在 Play 商店中上线后,Android 应用程序链接不起作用
【发布时间】:2019-09-16 14:41:06
【问题描述】:

我已经根据以下链接实现了 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 的 App Links Assitant。并通过两种方式获得验证状态。

现在,当我生成签名版本并通过 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>

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

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

adb shell dumpsys package domain-preferred-apps

当我运行上述命令时

【问题讨论】:

  • 它不起作用是什么意思?
  • @waghydjemy 不是直接在点击链接时打开应用程序,而是弹出消歧对话框。
  • 我遇到了类似的问题。您设法解决了这个问题吗?

标签: android android-studio android-app-links


【解决方案1】:

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

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

【讨论】:

  • 这个解决方案对我有用。谢谢。
【解决方案2】:

新 Play 商店的说明:

转到 Play 商店,转到您的应用仪表板,转到设置/应用完整性(在左侧面板上)

此页面底部是您的Digital Asset Links JSON,应上传到 https://ourdomain/.well-known/assetlinks.json

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-21
    • 1970-01-01
    相关资源
    最近更新 更多