Friday, 23 November 2018

Detect web app running as homescreen app on Android Stock Browser

We are building a web app that has to be used as a standalone / homescreen app. In Chrome and Safari we can detect if it is viewed from the browser or from native-like browser container with either window.navigator.standalone or window.matchMedia('(display-mode: standalone)'). Neither option seems to work with the default Android stock browser/Samsung Internet. Furthermore, we are also not able to use start_url in manifest.json, because we need to pass a token to the homescreen app that is unique per user.

Is it possible to detect if the app is opened from the homescreen when it was added using the android stock browser?

Related



from Detect web app running as homescreen app on Android Stock Browser

No comments:

Post a Comment