App Install Banner should use App Manifest start_url URL, not current URL |
|||
Issue descriptionWhat steps will reproduce the problem? 0. Have a site that supports App Install Banner 1. Visit page and have App Install Banner trigger on a deep URL, e.g. to a specific document, game session, etc. 3. Add website to homescreen via App Install Banner prompt. 4. Close tabs, reopen via home screen icon. What is the expected result? Homescreen launcher for site launches site at 'start_url'. What happens instead of that? New session of site launches to previous URL, always. This is bad on sites such as boardom.io which allow you to play games. The App Install Banner is likely to appear after a user is engaged and on a specific game URL. Returning to that specific game every time when launching from the home screen icon is not expected. Site developers shouldn't need to work around this by preventing the prompt, modifying the URL, and then allowing it. That contortion doesn't make sense other than as a pure work around -- as it would leave the URL in a poor state presuming the user ignores the prompt.
,
Jul 26 2016
,
Jul 26 2016
It happened to me, but I also reported it to matt@boardom.io who stated he would implement a work-around on boardom.io. matt@boardom.io, did you?
,
Jul 27 2016
I'm fairly sure the only way you could have triggered this is if the manifest previously set its start_url to the deep link, rather than the home page. But more details would be great to try and narrow down all of the variables.
,
Jul 27 2016
Hello all. Thanks for reporting this Vincent. I have not implemented the workaround, nor am I able to reproduce the issue myself. I'm certain that the start_url has only been "/". It would not make sense for me to set the start_url to a specific game. I also have notifications that open deep links into the app, eg: "https://boardom.io/game/3C2F6De1Ce102". The most unique case to my app that I can think of is the user receives a notification to a game, opens that, and then is prompted with the install banner. I was not able to reproduce the app with the following steps: 1: ensure Boardom is not on home screen 2: clear all tabs/instances of Boardom 3: restart device 4: connect via USB debugging 5: fire notification which opens deep link 6: click on notification via app which allows service worker to open deep link through a browser tab 7: prompt device to show install banner via chrome://inspect from connected computer 8: install app 9: press home and launch the installed app This opened the correct short_url "/" I tried a few other things such as simply triggering the install banner without a notification. In the past I've had users complain that notifications open chrome tabs instead of the installed PWA instance, but that's because my service worker doesn't differentiate between chrome tabs or installed instances, and eagerly picks an open window. I don't see how that confusion could be possible here though, since Vincent's bug report says he launched the app via the icon on the home screen. Chrome 51.0.2704.81 Android 6.0.1
,
Jul 27 2016
If we can't repro- then I suppose close. It is most likely that I had clicked a notification to enter a specific game, and then was presented the app install promo. It's likely that I had an existing tab open when I later used the home screen icon.
,
Jul 27 2016
Please re-open if you run into anything strange - we definitely want to track it down. :) |
|||
►
Sign in to add a comment |
|||
Comment 1 by dominickn@chromium.org
, Jul 25 2016