【问题标题】:TWA has assetLinks but is still opening with address barTWA 有assetLinks,但仍在使用地址栏打开
【发布时间】:2019-06-17 10:29:12
【问题描述】:

我们的 TWA 使用 SHA256 指纹进行签名并发布到应用商店。数字资产链接使用相同的密钥,验证TEST成功。但是,该应用仍会打开地址栏。

我使用以下命令验证了我们正在运行一个发布签名的构建(并且在应用商店中发布了相同的版本),并且确实提到 APK 处于发布模式。

命令:jarsigner -verify -verbose -certs your_apk.apk

(命令参考:https://medium.com/@chintanrathod/verify-if-apk-is-signed-with-certificate-or-debug-build-44a729e684ca

基本代码:https://github.com/GoogleChromeLabs/svgomg-twa

另外,这里是app/build.gradle文件的相关内容。

 buildTypes {
        release {
            minifyEnabled true
            debuggable false
        }
    }

这里是 twaManifest 信息:

def twaManifest = [
    applicationId: 'in.xyz.app',
    hostName: 'xyz.in', // The domain being opened in the TWA.
    launchUrl: '/', // The start path for the TWA. Must be relative to the domain.
    name: 'XYZ', // The name shown on the Android Launcher.
    themeColor: '#FFCD59', // The color used for the status bar.
    backgroundColor: '#ffcc99' // The color used for the splash screen background.
]

我们预计,由于“数字资产链接”有效,并且 PWA + TWA 配置正确,应用程序必须在没有地址栏的情况下打开,但事实并非如此。

请提出建议。

【问题讨论】:

    标签: android progressive-web-apps trusted-web-activity


    【解决方案1】:

    似乎https://xyz.in 重定向到https://www.xyz.in。第一个列出在应用程序中进行验证,第二个不是。尝试将hostName 更改为 www.xyz.in。

    【讨论】:

    • 是的,将主机名更改为 www.xyz.in 会删除地址栏。该站点被配置为在域配置中重定向到 www。感谢您的回答。
    • 谢谢。您能否与我分享 APK,以便我仔细查看问题所在?
    猜你喜欢
    • 1970-01-01
    • 2019-10-22
    • 1970-01-01
    • 1970-01-01
    • 2015-06-22
    • 1970-01-01
    • 1970-01-01
    • 2021-10-22
    • 2020-05-25
    相关资源
    最近更新 更多