jeudi 25 octobre 2018

How to get native install prompt for Android working?

I've been trying to show the install app prompt for Android on my web app but I'm failing it. My setup is a Rails web app and I have mobile apps for Android and iOS. iOS is working fine since it's very simple setup, but Android, which requires a json manifest isn't displaying the banner. I followed the instructions from Google Developers Install Prompt and Google Developers Web Manifest. I've added a link tag to the header of the page I want it to show

%link{ rel:'manifest', href: '/consumer-manifest.json' }

And I've placedd my manifest file in the /public/consumer-manifest.json folder.

The file is served as I checked it on the browser and the json content gets rendered.

Here's the json manifest

{ "short_name": 'myDomain', "name": 'mDom', "icons": [ { "src": "/icon-192x192.png", "type": "image/png", "sizes": "192x192" }, { "src": "/icon-192x192.png", "type": "image/png", "sizes": "512x512" }, ], "prefer_related_applications": true, "related_applications": [ { "platform": "play", "id": "nz.co.domain.app" } ] }

According to what found in the docs both icon sizes are required, I'm listing the same icon file since I don't have a 512x512 size one. Wonder if that could have anything to do with it.

I've also bypassed the Engagement Checks in

chrome://flags/#bypass-app-banner-engagement-checks

to make sure it doesn't get on the way. Still no luck.

Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire