Requirements to make PWA in a WebAPK format

2019-04-06 04:41发布

问题:

I am working on my website. I managed to get basic PWA functionality using the web page manifest file.

Not long ago, Google released deeply integrated PWAs, allowing users to make a WebAPK when they added the page into the home screen.

I want my page to also have that kind of feature, but it is never been clear what I should do to get that functionality..

Do I need to add something extra aside from the manifest file, sw.js and various meta tags?

回答1:

This is not something we can control. Chrome was/is experimenting with "improved A2HS" as they called it (A2HS stands for "add to homescreen") and a part of that was an internal service that wrapped the PWA into APK. It was hidden behind a flag initially, then it was opened to the public as default in Feb 2017.

When you install a Progressive Web App, we look at your Web App Manifest and other meta-data and create the APK that is installed on to the user's device.

(emphasis mine, we == Android)

So there's nothing we can do except being sure our manifest is valid, site is HTTPS, Service Worker installs correctly etc.