- From: vsuperator <notifications@github.com>
- Date: Tue, 16 May 2017 13:03:25 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/579@github.com>
I want to add to my app "Add To home screen banner", I went through the manual https://developers.google.com/web/fundamentals/engage-and-retain/app-install-banners/#testing-the-app-install-banner First I registered a sw in my index.html file ``` navigator.serviceWorker.register('service-worker.js') .then(() => { console.log('Service worker successfully registered.'); }) .catch(err => console.log("There is an error registering SW.")) ``` Then I made a manifest file ``` { "short_name": "RUNtrix", "name": "RUNtrix", "icons": [ { "src":"/img/logo-96x96.png", "sizes": "96x96", "type": "image/png" }, { "src":"/img/logo-144x144.png", "sizes": "144x144", "type": "image/png" }, { "src":"/img/logo-192x192.png", "sizes": "192x192", "type": "image/png" } ], "start_url": "/dashboard/day", "background_color": "#ffffff", "theme_color": "#536878", "display": "standalone" } ``` Also I added eventListener in order to call prompt() in another place ``` window.addEventListener('beforeinstallprompt', (event) => { console.log('beforeinstallprompt fired index'); // It doesn't show at all }); ``` So it work's if I fire an event manually. But when I launch the site (served on https) from mobile devices it doesn't work. Is it a bug? Or am I doing smth wrong? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/579
Received on Tuesday, 16 May 2017 20:04:07 UTC