Web App Install Banner: Cancel 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:

Sometimes a developer might want full control or when the banner is displayed, for instance they already have an app install banner. In this case the developer would actively want to cancel Chrome's intention to show the banner.

In this example you will see below a message indicating that the beforeinstallprompt occured (only after meeting the above criteria) and was cancelled.


To see if this example works, come back in another day 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.