Web App Install Banner: Detect User Install or Cancel of prompt sample

Available in Chrome 42+ (for Android)

The web app install banner will prompt the user to add your web app to the users home screen. It will only prompt when a number of criteria have been met:

Frequently developers want to know how well the app banner converts a user into an installed experience. This API and example show you how the developer can understand what the user did when prompted to install the web app.

Below you will see the output of the example. In this example the code will return a promise that will indicate the action of the user. Did they install it, or did they cancel the install.


To see if this example works, come back in a few minutes and you will see the banner.

For testing we encourage you to force the banner to appear by setting the chrome://flags/#bypass-app-banner-engagement-checks flag.