google / physical-web

The Physical Web: walk up and use anything
http://physical-web.org
Apache License 2.0
5.99k stars 665 forks source link

Progressive Web App "add to home screen" not supported on Custom Tabs #913

Open kelvinwatson opened 7 years ago

kelvinwatson commented 7 years ago

I am building a Progressive Web App (PWA) that opens from a Nearby Notification.

I notice that Nearby Notifications now uses Chrome Custom Tabs to open URLs (this seems to be a recent change??). However, when my PWA opens in a Chrome custom tab, the "add to home screen" bottom sheet that normally automatically appears for PWA's is no longer appearing.

It seems that Chrome Custom tabs does not support all parts of the PWA manifest? https://developers.google.com/web/updates/2017/02/improved-add-to-home-screen

Note that when I open my PWA in the Chrome browser (not custom tabs), the "add to home screen" bottom sheet correctly appears.

May I propose perhaps a flag that we can pass in the URL that Nearby can detect that we want the URL to open in Chrome browser rather than open in Chrome Custom Tabs?

kanodia commented 7 years ago

Hi

Add to home screen banner has certain criteria that must be met before it is triggered Read about it here https://developers.google.com/web/updates/2015/03/increasing-engagement-with-app-install-banners-in-chrome-for-android