TWA-数字资产链接正常,但地址栏仍然可见 [英] TWA - Digital Asset Link OK but address bar still visible
问题描述
我开发了Progressive Web App,并希望将其作为受信任的Web活动发布在Play商店中. 它是 https://www.bagnoadriatico.it
I developed a Progressive Web App and I want to publish it in the Play Store as a Trusted Web Activity. It's https://www.bagnoadriatico.it
遵循本指南 https://developers.google.com/web/updates/2019/02/using-twa
我从下载了示例 https://github.com/GoogleChromeLabs/svgomg-twa
我更改了配置
def twaManifest = [
applicationId: 'com.simovinci.bagnoadriatico',
hostName: 'www.bagnoadriatico.it', // The domain being opened in the TWA.
launchUrl: '/mobile', // The start path for the TWA. Must be relative to the domain.
name: 'BagnoAdriatico di Casalborsetti', // The name shown on the Android Launcher.
themeColor: '#ff5c14', // The color used for the status bar.
backgroundColor: '#ffff00' // The color used for the splash screen background.
]
然后我签署了APK,进行了构建并在Play商店中发布.
then I signed the apk, build and published on play store.
在网站上,我通过Digital Asset Link创建了关联 https://www.bagnoadriatico.it/.well-known/assetlinks.json 语句列表生成器和测试器"说操作成功 成功!主机www.bagnoadriatico.it授予应用与com.simovinci.bagnoadriatico的深层链接." https://developers.google.com/digital-asset-links/tools/生成器
In the website I created the association by Digital Asset Link https://www.bagnoadriatico.it/.well-known/assetlinks.json The "Statement List Generator and Tester" say that the operation was successful "Success! Host www.bagnoadriatico.it grants app deep linking to com.simovinci.bagnoadriatico." https://developers.google.com/digital-asset-links/tools/generator
地址栏仍然可见,我不知道为什么.
The Address bar still visible, I don't know why.
https://www.bagnoadriatico.it/mobile 返回200个http代码. PWA已通过100%Lighthouse验证. 关键的指纹是正确的
https://www.bagnoadriatico.it/mobile returns a 200 http code. The PWA is 100% Lighthouse validated. The key finger print is right
我尝试将launchUrl ="/"设置(在将302删除为移动版本之前),但没有任何更改.地址栏仍然可见.
I tried to set launchUrl = "/" (before I removed the 302 to mobile version) but nothing changed. The address bar is still visible.
推荐答案
如果您通过Google Play使用过应用签名,则SHA 256会更改.解决方法是从Play商店下载您的应用,然后通过Play商店也使用以下工具生成新的assetlinks.json文件:
If you have used app signing by Google Play, your SHA 256 changes. The fix is to download your app from the Play Store and then generate a new assetlinks.json file by using the following tool also from the Play Store:
https://play.google .com/store/apps/details?id = dev.conn.assetlinkstool& hl = zh_CN
这篇关于TWA-数字资产链接正常,但地址栏仍然可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!