如何区分 Android Trusted Web Activity(包含在 WebView 中的 PWA)和已添加到主屏幕(全屏模式)的 Progressive Web App?
是否可以在 JS 或 CSS 甚至 HTML5 中使用?
编辑:人们问我 TWA 和 PWA 之间有什么区别。我相信在这里解释这一点超出了这个问题的范围。如果我错了,请纠正我。
我已经成功地通过“我的本地APK”实现了Android应用链接,并且可以正常运行。当我在Google Play商店中发布相同的APK时,我发现我需要使用Google提供的指纹来更改/.well-known/assetlinks.json中的SHA 256指纹。所以我改变了。不幸的是,Google似乎保留了assetlinks.json的旧副本,这会破坏我的应用程序链接。
我已经检查过 https://developers.google.com/digital-asset-links/tools/generator,它说:“未找到[您的应用]的应用深链接权限”
我已经检查了 https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=[my-site]&relation=delegate_permission/common.handle_all_urls,它向我展示了旧版本的assetlinks.json
我的robots.txt
User-agent: *
Disallow:
Run Code Online (Sandbox Code Playgroud)
我的.htaccess文件位于/.well-known目录中
Require all granted
RewriteEngine Off
<FilesMatch "\.(txt)$">
Require all granted
</FilesMatch>
<FilesMatch "\.(txt)$">
Allow from all
</FilesMatch>
Run Code Online (Sandbox Code Playgroud)
我的assetlinks.json
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app", "package_name": "my-app-id",
"sha256_cert_fingerprints": ["my-sha-256-provided-by-gogole-play-console"] }
}]
Run Code Online (Sandbox Code Playgroud)
https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=[my-site]&relation=delegate_permission/common.handle_all_urls的结果
{
"statements": [
{
"source": {
"web": {
"site": "https://my-host."
}
},
"relation": "delegate_permission/common.handle_all_urls",
"target": {
"androidApp": {
"packageName": "my-app-id",
"certificate": {
"sha256Fingerprint": "the-old-sha-256-fingerprint"
}
}
}
}
],
"maxAge": "534347.929731888s",
"debugString": …
Run Code Online (Sandbox Code Playgroud) 我在 Play Market 上有一些应用程序,我想在华为 AppGallery 上发布它们。我关心下一个依赖项:
这份名单中没有人会工作,我是对的吗?我的意思是在禁止列表中的设备上。如果是,该依赖项的解决方法是什么?或任何其他/额外的限制?