Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TWA - Digital Asset Link OK but address bar still visible

I developed a Progressive Web App and I want to publish it in the Play Store as a Trusted Web Activity. It's https://www.bagnoadriatico.it

Following this guide https://developers.google.com/web/updates/2019/02/using-twa

I downloaded the example from https://github.com/GoogleChromeLabs/svgomg-twa

I changed the configuration with

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.
]

then I signed the apk, build and published on play store.

In the website I created the association by Digital Asset Link https://www.bagnoadriatico.it/.well-known/assetlinks.json The "Statement List Generator and Tester" say that the operation was successful "Success! Host www.bagnoadriatico.it grants app deep linking to com.simovinci.bagnoadriatico." https://developers.google.com/digital-asset-links/tools/generator

The Address bar still visible, I don't know why.

https://www.bagnoadriatico.it/mobile returns a 200 http code. The PWA is 100% Lighthouse validated. The key finger print is right

========================================

I tried to set launchUrl = "/" (before I removed the 302 to mobile version) but nothing changed. The address bar is still visible.

like image 837
Simo Vinci Avatar asked Jun 07 '19 07:06

Simo Vinci


People also ask

How does the @TWA digital asset link work?

TWA creates this association via digital asset links. This association goes two ways. Form website to app and from app to website. Once it is configured correctly, the address bar will disappear.

How to hide the address bar in TWA?

With TWA, you never need to write hacky JavaScript to hide the address bar. Technically speaking, this association is done by creating .well-known/assetlinks.json in the root of the site.

What is Twatwa?

TWA creates this association via digital asset links. This association goes two ways. Form website to app and from app to website. Once it is configured correctly, the address bar will disappear. With TWA, you never need to write hacky JavaScript to hide the address bar.

How do I add digital asset links to my intent filters?

Declare the association between your website and your intent filters by hosting a Digital Asset Links JSON file at the following location: You can find related information in the following resources: To enable link handling verification for your app, add intent filters that match the following format: <!--


1 Answers

If you have used app signing by Google Play, your SHA 256 changes. The fix is to download your app from the Play Store and then generate a new assetlinks.json file by using the following tool also from the Play Store:

https://play.google.com/store/apps/details?id=dev.conn.assetlinkstool&hl=en

like image 122
Justin Pillay Avatar answered Oct 11 '22 13:10

Justin Pillay