1

I have an Angular 9 app. I want to show some message when user open it on gmail in-app browser. I did't find a way difference between gmail in-app browser and Safari on iPhone. I've tried those approaches: detect ipad/iphone webview via javascript, check for indexeddb, Navigator.canShare() and they didn't help. navigator.userAgent are same on those browsers. Please help to find differences.

3 Answers3

0

@maksym do you wish to differentiate the user sessions when your website is opened in the web driver of Gmail IOS app?

Walle
  • 11
  • 3
0

On iPhone, the viewport height is slightly different (iPhone 8: 1445 in Safari, 1461 in Gmail).

If:

  1. user email domain is Gmail
  2. iOS mobile user agent match
    • Gmail viewport size match (different per device)
      • assume user is in Gmail app
      • show interstitial page prompting user to click Safari link in bottom right, & also smaller sized link warning to 'Continue in Gmail app' if you want.

Note: This would not work for custom domains, or you would have to map them somehow.

baussman
  • 65
  • 6
0

You might consider promoting the Add To Home Screen (ATHS) process prior to the user completing registration. As long as it’s optional and doesn’t really block the user from completing registration itself, you have nothing to lose.

vrtjason
  • 523
  • 5
  • 12