I understand that with a properly made Progressive Web App mobile browsers will display a banner prompting users to 'Install' the app on their home screen.
I have been looking around for a way to trigger that prompt from within the app, but have not been able to find anything.
Is there a line of JavaScript that can be used to call the install prompt banner at any time?? Something that I could add to a install button tucked away in a help screen for instance?
It might be difficult for some users to find the "Add to Home Screen" option if they missed the install banner prompt. I'd like to give them a button they can click to be prompted again.
2020 EDIT: Yes, this is possible in Chrome - see answer below
See this great article: How to provide your own in-app install experience and my working demo of the article's process applied in a React app.
Or for a slightly different approach, see how snapdrop.net did it.