Re: [manifest] Allow developers to detect when the user has added the site to their home screen (or equivalent) (#417)

@RByers the problem with "beforeinstallprompt" is that it assumes Chrome's UI install flow. That might not match what all UAs do. For example, in Firefox, we are working on "installing" apps into the about:newtab page, which doesn't mandate any install flow. 

One current solution to this problem is the use the start URL and just add a query string:

```JS
{
   "start_url": "foo/?launched-from=homescreen" 
} 
```

Another way of detecting if the app has been installed is if the display mode has been applied (using matchMedia). 

```JS
matchMedia("(display-mode: fullscreen)").matches 
```


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/417#issuecomment-164981366

Received on Wednesday, 16 December 2015 03:48:35 UTC