ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

FR: Support "add to homescreen" banner/button for PWAs #6921

Open ericlindley-g opened 7 years ago

ericlindley-g commented 7 years ago

Tracking issue to extend <amp-app-banner> support to include promo for progressive web apps "add to homescreen" banner

thomaspessato commented 7 years ago

Looking forward to have this possibility 🛏

odiego commented 7 years ago

Is this on the roadmap? It would be an awesome feature!

ericlindley-g commented 7 years ago

We do really want to support this, @odiego — mostly a matter of finding time to do it :) @aghassemi, do you know if this is straightforward enough for a GFI?

aghassemi commented 7 years ago

hmm, I am not sure how this would work. Unless Chrome has decided that web app is worthy to be homscreenable, we can't prompt for add-to-homescreen AFAIK (this is different than amp-app-banner where we can just open a link to app store). If chrome has already decided the app is worthy, then service-worker has already ran and we are in PWA land and the app shell can handle this anyway.

Maybe I am missing something /cc @cvializ

gui-poa commented 7 years ago

Chrome will never prompt, because the page is served from AMP Cache (vast majority). It is a Security issue. "Manifest: property start_url ignored, should be same origin as document"

Maybe it's a Chrome issue. But, definetely, it would be a nice feature to improve AMP + PWA.

cvializ commented 7 years ago

I am inclined to believe that more often than not, the add to homescreen banner will need to be triggered by the PWA shell and not the AMP document. Like @gui-poa stated, the page will need to be served from the document origin and not the AMP cache for the banner to work. AMP install service worker can allow the app to switch to the PWA experience where the PWA can then implement the banner.

Maybe this issue could instead track the effort to add the banner to one of our PWA shell examples? @ericlindley-g @dvoytenko

demianrenzulli commented 4 years ago

Hi team,

Televisa is using AMP as a framework for several properties (e.g. noticieros.televisa.com), and is interested on being able to track PWA metrics, like A2HS acceptance rate (as explained here for non-AMP sites).

Is there any chance to re-prioritize this feature, so that AMP-first sites can access to similar PWA capabilities than non-AMP websites?

Otherwise, can you think on a workaround for this?

cc // @HelaGone

dvoytenko commented 4 years ago

/cc @nainar

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.