2

With iPhone you can display different content for the same URL depending on whether the page is visited in normal Safari or via a home screen icon for that webpage. If the page is visited in Safari then you typically display the instructions for downloading the app. And if the page is visited via the home screen icon then you display the app.

I currently have all this setup for a client. When the URL is visited by a non-iOS device, then the app is always shown(i.e. instructions are never shown like with iOS if visited in Safari).

My question is, on Android is there any way I can detect if the page is launching via a home screen icon or not so that I can display instructions or the app like on iPhone? If not, what's the best alternative?

Ryan
  • 5,883
  • 13
  • 56
  • 93
  • "If the page is visited in Safari then you typically display the instructions for downloading the app" -- even if the app is already installed? The Android equivalent would offer to launch the app *or* bring up the page in a browser, and I don't know if that meets your needs. – CommonsWare Aug 10 '14 at 23:35
  • Yes, if you visit the web page normally by browsing to it in Safari then the same content(usually app download instructions) will always display. The only differentiator is whether you browse to the page normally in Safari or if you go to the page by tapping the home screen icon(this home screen icon is a bookmarked web page). And I think the reason why this works on iOS is because when the page is launched via the home screen icon then `window.navigator.standalone` is true. But to my knowledge there is no `window.navigator.standalone` on Android. Or is there? – Ryan Aug 10 '14 at 23:49

0 Answers0