61

On Android, when the user opens a mail with Gmail and clicks a link contained in the mail, then this URL is opened in sort-of a "mini browser", with a special bar at the top.

In my case the URL is a Portable Web Application (PWA) and should be opened in the Chrome browser itself (giving the user the possibility to manually add the URL to the home screen).

Is there a way to tell Gmail to always open the URL in the normal Chrome Mobile browser (or the standard browser)?

target="_blank" doesn't seem to help...

Janusz
  • 187,060
  • 113
  • 301
  • 369
Udo G
  • 12,572
  • 13
  • 56
  • 89
  • 3
    That "mini browser" is called Chrome Custom Tabs and afaik there is no way to prevent a link being opened in it. This can only be disabled by the user in the Gmail app settings. – Floern Mar 03 '17 at 20:46
  • 1
    Is there a way to detect if the page is opened in "Chrome Custom Tabs" so that I can adapt my contents? – Udo G Mar 03 '17 at 20:55
  • I don't know, didn't find anything. Apparently the user agent string is the same as Chrome's, didn't test it though... – Floern Mar 03 '17 at 21:56
  • Any news on that @UdoG @Floern? We have an application that requires file upload and in some cases the upload doesn't seem to work – lucianokrebs Apr 22 '20 at 16:15
  • unfortunately, no – Udo G Apr 22 '20 at 21:07
  • I tested with target="_blank" and this seems to work on Android as well as on IOS. I guess Google fixed this in the current version of the Gmail app – Corne Sep 02 '20 at 08:43
  • @Corne how you added the target in the link while sending an email and made sure the link opens in Browser and not within the gmail app ? – Vibhoo Mishra Jul 21 '22 at 09:43

2 Answers2

37

In Gmail go to settings --) General, and uncheck the option to open links in gmail.

HRVHackers
  • 2,793
  • 4
  • 36
  • 38
  • 14
    The question is about what a prigrammer can do, not the user – Udo G Jul 12 '17 at 21:25
  • 7
    That's not clear from the subject line, and thereby it's one of the first Google results for users like myself who need help with this feature. I can delete my answer if you insist though – HRVHackers Jul 13 '17 at 00:13
  • 19
    Thanks for not deleting since this is the first place Google led me and is the answer I was looking for. – isimmons Sep 12 '17 at 03:32
  • 4
    My Gmail Android app doesn't have this option. – neves Nov 28 '17 at 23:10
  • plused one cause this info was useful, although not the question I was looking for – phriendtj Jul 03 '18 at 20:05
-10

Users have an expectation of consistency when they interact with apps, sites, and browsers. You should let the browser defaults and user configuration control this behaviour. Surprised users will just be annoyed with your apps confusing differences with every other site they use.

abraham
  • 46,583
  • 10
  • 100
  • 152
  • 13
    The expectation of my users is to see my app to open in it's usual way - without any browser controls. In fact, my users are confused by the Gmail behavior. – Udo G Oct 11 '17 at 06:00