我开发了一个渐进式 Web 应用程序,我想将它作为受信任的 Web 活动发布到 Play 商店。这是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商店发布。
在我通过 Digital Asset Link https://www.bagnoadriatico.it/.well-known/assetlinks.json创建关联的网站中 ,“Statement List Generator and Tester”说操作成功“成功!主机 www.bagnoadriatico .it 授予应用程序与 com.simovinci.bagnoadriatico 的深度链接。” https://developers.google.com/digital-asset-links/tools/generator
地址栏仍然可见,我不知道为什么。
https://www.bagnoadriatico.it/mobile返回 200 http 代码。PWA 经过 100% Lighthouse 验证。关键指纹是对的
=========================================
我尝试设置 launchUrl = "/" (在我将 302 删除到移动版本之前)但没有任何改变。地址栏仍然可见。