Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you give your mobile web app an install screen?

Similar to how forecast.io does it - if you visit their website on your phone. this shows up:

forecast.io

Once you add it to your home screen, the rest of the app becomes available.

like image 672
Latka Gravas Avatar asked Jun 25 '13 20:06

Latka Gravas


1 Answers

window.navigator.standalone

will result in true if you have launched from the Home Screen or false if the page is open in a browser. Documented very nicely by Apple in their Developer Docs and works with OS 2.1 and up.

For example:

if (window.navigator.standalone) {
    // fullscreen mode

}
like image 117
Wulf Solter Avatar answered Oct 16 '22 03:10

Wulf Solter