androidprogressive-web-appstrusted-web-activity

Remove browser URL bar in TWA


I created a PWA and everything works ok, but when I converted it to a TWA and posted it on Google Play, a browser URL bar appeared on the app. How can I remove it? The manifest is set to standalone mode.

I built it with bubblewrap.

beresta.app:
enter image description here

Here is my manifest in 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"
}

Solution

  • According to the documentation, this happens when the browser can't verify your Digital Asset Links. (these are how you prove you own the website):

    When you launch a Trusted Web Activity, the browser will check that the Digital Asset Links check out, this is called verification. If verification fails, the browser will fall back to displaying your website as a Custom Tab.

    You'll need to create an assetlinks.json file and upload it to https://beresta.app/.well-known/assetlinks.json.

    More information on how to create this file and what it contains: https://developer.chrome.com/docs/android/trusted-web-activity/android-for-web-devs/#digital-asset-links