3 ms·
The abuse considerations were what led us to implement the engagement check. An API for this would absolutely be spammy. If everyone is going to be calling it
by slightlyoff 11y ago
The abuse considerations were what led us to implement the engagement check. An API for this would absolutely be spammy.
If everyone is going to be calling it on every page-load, and if the browser is (predictably) not going to allow that to show every time (see window.open()), then why provide an API when we could just treat meeting the criteria we'd look for anyway as the same thing as calling such an API?
That's what the Chrome system does: you've implicitly called "addToHomescreen()" on every page load where your app meets the criteria. When we allow it to show is still mediated by the browser.
Chrome 44 is going to allow a measure of control: http://updates.html5rocks.com/2015/03/increasing-engagement-with-app-install-banners-in-chrome-for-android#cancel http://updates.html5rocks.com/2015/03/increasing-engagement-...
The event is cancelable, meaning that if you don't want it to show on a particular page, it'll trigger again on the next. We'll also be adding a way for you to delay the load; cancel and re-trigger inside the same page. The way to think about it is that you sometimes get a golden ticket. We'll give you the ability to spend it when you want in the near future, but making you do an API call when the intent is already clear just seemed like bad design.