删除pwa中的浏览器栏

问题描述 投票:0回答:1

我创建了一个 pwa 应用程序,一切正常,但是当我将其转换为 twa 并将其发布到 google play 上时,那里出现了一条浏览器行。如果在清单中设置为

standalone
模式,我该如何删除。

我通过

bubblewrap
构建它。

beresta.app

这是我在 twa 的清单

twa-manifest.json

{
  "packageId": "app.beresta.twa",
  "host": "beresta.app",
  "name": "береста",
  "launcherName": "береста",
  "display": "standalone",
  "themeColor": "#473C33",
  "themeColorDark": "#000000",
  "navigationColor": "#000000",
  "navigationColorDark": "#000000",
  "navigationDividerColor": "#000000",
  "navigationDividerColorDark": "#000000",
  "backgroundColor": "#473C33",
  "enableNotifications": true,
  "startUrl": "/",
  "iconUrl": "https://beresta.app/assets/icons/icon-512x512.png",
  "maskableIconUrl": "https://beresta.app/assets/icons/icon-512x512.png",
  "splashScreenFadeOutDuration": 300,
  "signingKey": {
    "path": "C:\\repos\\beresta-gp\\android.keystore",
    "alias": "android"
  },
  "appVersionName": "1",
  "appVersionCode": 1,
  "shortcuts": [],
  "generatorApp": "bubblewrap-cli",
  "webManifestUrl": "https://beresta.app/manifest.webmanifest",
  "fallbackType": "customtabs",
  "features": {},
  "alphaDependencies": {
    "enabled": false
  },
  "enableSiteSettingsShortcut": true,
  "isChromeOSOnly": false,
  "isMetaQuest": false,
  "fullScopeUrl": "https://beresta.app/",
  "minSdkVersion": 19,
  "orientation": "default",
  "fingerprints": [],
  "additionalTrustedOrigins": [],
  "retainedBundles": [],
  "appVersion": "1"
}
javascript android cross-browser progressive-web-apps trusted-web-activity
1个回答
0
投票

根据文档,当浏览器无法验证您的数字资产链接时,就会发生这种情况。 (这是您证明您拥有该网站的方式):

当您启动可信网络活动时,浏览器将检查数字资产链接是否已签出,这称为验证。如果验证失败,浏览器将回退以将您的网站显示为自定义选项卡。

您需要创建一个

assetlinks.json
文件并将其上传到
https://beresta.app/.well-known/assetlinks.json

有关如何创建此文件及其包含内容的更多信息:https://developer.chrome.com/docs/android/trusted-web-activity/android-for-web-devs/#digital-asset-links

© www.soinside.com 2019 - 2024. All rights reserved.