Intent to Implement: API to support web/native app install banners
Contact emails
benw...@chromium.org, sligh...@chromium.org, owe...@chromium.org (pm), ta...@chromium.org (pm)
Spec (in progress)
https://github.com/slightlyoff/AppInstallImprovements/blob/master/explainer.md
Summary of feature
Chrome 42 for Android will encourage users to add high quality sites they visit frequently to their home screen. We would eventually like to provide developers control over this banner, including its timing and the ability to show a native app in the banner in place of the web app. Note this is primarily a UA-specific UI feature.
The motivation for the banner is two fold:
Many web developers wish they could place an icon for their web app on the users homescreen to drive more re-engagement. Chrome currently has a menu item which allow users to add a site to their homescreen but it isn’t easily discovered.
Many websites currently implement ‘door slam interstitials’ demanding users install their native app. Our implementation only prompts users to install the app if they have already shown engagement on the site and provides much more respectful UX. We hope developers will adopt this, reducing the number of door slam users experience on the web.
Example of a UI that may be provided to a user after visiting the SVGOMG web app multiple times:
Summary of proposed changes
The triggering of the banner is the decision of Chrome and in the initial implementation will depend on repeat engagement and a minimal site quality bar. This intent covers the minimal API we propose that will allow developers to configure the banner:
The related_applications key in the Web Manifest for sites to provide a prioritized list of the various versions of their app that exist (e.g. web app, native android app etc) that the user may want to install.
The beforeinstallprompt event allows developers to detect when the prompt has been shown and what the user's choice was. The spec includes a proposal that allows developers to postpone Chrome from showing the banner but we do not expect to block our eventual intent to ship on that feature.
This feature relates to Safari's Smart App Banners, but is distinct as it supports installing apps from many platforms (including web apps) generically. This new API provides the site with more insight into the user interactions with the banner via the beforeinstallprompt event.
Ongoing technical constraints
None
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Android: Yes
Windows, Mac, Linux, ChromeOS: Not today, but we plan to support them in the future
Android WebView: No, it’s not obvious how a feature like this would be supported in web view
iOS: No, we are unable to support this due to platform limitations
Compatibility Risk
The new API surface is small and we believe this new feature will move the web forward significantly. We intend to iterate on this feature in collaboration with other browser vendors and to evolve our design as we gather feedback from developers who adopt the API-less version of the banner in M42.
One minor risk is that the set of outcomes returned by the userChoice promise may change/expand. Today it only supports installed and dismissed.
OWP launch tracking bug?
https://code.google.com/p/chromium/issues/detail?id=459839
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4540065577435136
Requesting approval to ship?
NoTo unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
When will it be possible to control this prompt? I don't plan on door slamming my users but am hesitant to implement this prompt as my Web app is a game with controls at the bottom of the screen. If I don't have control, this would undoubtedly popup over the main game controls. I would like to be able to show it to a player in a non game screen such as you ran out of money, you leveled up ect. Is that possible?