Mobile Safari: Detect if within Gmail App
Asked Answered
C

0

7

I've created a basic web app and it has a little "click here to add to home screen" pop up that appears if it's not in stand alone mode (i.e. not on your home screen already). I have a basic registration system that emails the users links to the app but now noticed that if they open the link from their iOS Gmail app the bottom bar with the options menu doesn't appear but the pop up still will.

Are there any device, browser, or navigator properties I can pull to detect I'm within the Gmail app and not in the Mobile Safari browser app itself? Thanks.

Carver answered 11/10, 2013 at 19:27 Comment(3)
I'm hitting a variation of this problem. The UA string provided by the GMail app today is identical to the one used by standalone / home screen apps. It also appears that they set window.standalone to true for some reason. This means our code thinks it's running as a home screen app when it's actually in the GMail client. Really annoying.Dateless
Fortunately my initial assessment was wrong and at least the client side can detect the lack of window.standalone. Still annoying though.Dateless
I'm having the same issue. @BrandonPaddock window.standalone is undefined both on the Gmail app and in Safari. Anyone found a solution?Felske

© 2022 - 2024 — McMap. All rights reserved.