question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App opens like a link with url bar at the top, rather than like an android app

See original GitHub issue

Describe the bug After installing the generated apk, the app opens like a normal link in the Google app rather than an android app. It has a url bar at the top

To Reproduce Steps to reproduce the behavior: use bubblewrap cli to generate apk using the following manifest:

Note: The links are fake

// twa-manifest.json

{
  "packageId": "app.web.facpro.twa",
  "host": "facpro.web.app",
  "name": "FACPRO - Faculty Research Progress",
  "launcherName": "FACPRO",
  "display": "fullscreen",
  "themeColor": "#FFFFFF",
  "navigationColor": "#000000",
  "navigationColorDark": "#000000",
  "navigationDividerColor": "#000000",
  "navigationDividerColorDark": "#000000",
  "backgroundColor": "#FFFFFF",
  "enableNotifications": true,
  "startUrl": "/",
  "iconUrl": "https://facpro.web.app/logo512.png",
  "maskableIconUrl": "https://facpro.web.app/maskable_icon_x512.png",
  "splashScreenFadeOutDuration": 300,
  "signingKey": {
    "path": "/path/to/android.keystore",
    "alias": "android"
  },
  "appVersionName": "1",
  "appVersionCode": 1,
  "shortcuts": [],
  "generatorApp": "bubblewrap-cli",
  "webManifestUrl": "https://facpro.web.app/manifest.json",
  "fallbackType": "customtabs",
  "features": {},
  "alphaDependencies": {
    "enabled": false
  },
  "enableSiteSettingsShortcut": true,
  "isChromeOSOnly": false,
  "orientation": "default",
  "fingerprints": [],
  "additionalTrustedOrigins": [],
  "retainedBundles": [],
  "appVersion": "1"
}
//manifest.json of website

{
  "short_name": "FACPRO",
  "name": "FACPRO - Faculty Research Progress",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
      "src": "logo192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "logo512.png",
      "type": "image/png",
      "sizes": "512x512"
    },
    {
      "src": "maskable_icon_x512.png",
      "type": "image/png",
      "sizes": "512x512",
      "purpose": "any maskable"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#ffffff",
  "background_color": "#ffffff"
}

Expected behavior The app should open like an normal android app, without the url bar

Screenshots Screenshot of app with url bar (in android emulator) Screenshot of app with url bar (in android emulator)

Screenshot of app with url bar (in physical device OnePlus 7) Screenshot of app with url bar(in physical device OnePlus 7)

Desktop

  • OS: Fedora 35 workstation
  • Browser: Chrome
  • Version: 100

Smartphone (please complete the following information):

  • Device: OnePlus 7
  • OS: Android 11
  • Browser: chrome
  • Version: Android Chrome 100.0.4896.79

Additional context Additionally, the PWA works great when installing from the browser using the install app option from the website. It opens like a usual android app, without the url bar

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Pika-Poolcommented, Apr 18, 2022

@SJShip, I just checked it, and I had names the assetlinks.json file as assetslinks.json. I’ve wasted so much time on this because of a small spelling mistake. Unbelievable.🤦🤦

Thanks a lot for pointing it out.

0reactions
SJShipcommented, Apr 18, 2022

@Pika-Pool , A Trusted Web Activity needs the origins being opened to be validated using Digital Asset Links, in order to show the content in full-screen (without URL bar). Did you provide the /.well-known/assetlinks.json endpoint for your root domain and subdomain with correct assetlinks?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Android App Links
... Communicate with fragments · Working with the app bar · Displaying dialogs with DialogFragment · Debug your fragments · Test your fragments....
Read more >
A complete guide to mobile app deep linking
Mobile app deep linking is a technology that launches an app and opens a specific page once a user clicks a URL on...
Read more >
Manage webpages in the Google app - Android
On your Android phone or tablet, open the Google app Google Search . · At the top right, tap your Profile picture or...
Read more >
Add to Home screen - Progressive web apps (PWAs) | MDN
Open the menu next to the URL bar. Depending on whether you're using Chrome or Android you'll see a menu option "Install" or...
Read more >
6 secret settings for a smarter Chrome Android setup
Type chrome:flags into your Chrome Android app's address bar. ... If you're anything like me and tend to keep somewhere between 20 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found