20

Not long ago, Google added a new feature called Chrome Custom Tabs since Chrome 45 on Android JellyBean or later.

What are Chrome Custom Tabs?

App developers face a choice when a user taps a URL to either launch a browser, or build their own in-app browser using WebViews.

Both options present challenges — launching the browser is a heavy context switch that isn't customizable, while WebViews don't share state with the browser and add maintenance overhead.

Chrome Custom Tabs give apps more control over their web experience, and make transitions between native and web content more seamless without having to resort to a WebView.

When will this be available?

As of Chrome 45, Chrome Custom Tabs is now generally available to all users of Chrome, on all of Chrome's supported Android versions (Jellybean onwards).

custom tabs demonstration

Google has integrated this feature on some of their apps (e.g. Google+, Google Search) and now, 3rd-party apps can also use it (e.g. Twitter, Stack Exchange).

While some apps provide setting to enable/disable it (e.g. Google Search), others don't seem to be possible to disable this. I know I can still open the link in Chrome by tapping the overflow menu (3-dots on top-right) and select Open in Chrome. However, it'd be preferable if it can be disabled on specific apps.

So, my question is: is it possible to disable this feature, preferably on selective apps? (by disable, I mean to open the link directly in default browser, or prompt user to choose a browser)

Note: I'm open to all suggestions, including root solutions, or even uninstalling Chrome in the worst case scenario. However, more practical answers are preferred.

8

The Custom Tabs help page says:

What happens if the user doesn’t have a recent version of Chrome installed?

Custom Tabs uses an ACTION_VIEW Intent with key Extras to customize the UI. This means that by default the page willopen in the system browser, or the user's default browser.

If the user has Chrome installed and it is the default browser, it will automatically pick up the EXTRAS and present a customized UI. It is also possible for another browser to use the Intent extras to provide a similar customized interface.

That means, if you make some other browser the default one (this can be done via Settings > Apps > Cog menu > Default Apps), any app trying to open a Custom Tab will open the link in that browser instead.

Update: That also means, it's possible to write a "manager" app that presents itself as a browser (handles ACTION_VIEW intent), and on receiving this intent checks whether it has Custom Tabs-related EXTRAS, and depending on some logic opens a browser of your choice using an explicit intent (where the desired app package name is explicitly specified).

  • Thanks, changing default browser somewhat worked on some apps (e.g. Stack Exchange app), but didn't work on the rest (e.g. Google News & Weather), not sure for the reasons... The manager app is an interesting idea and I'll try to experiment if it works with automation app! – Andrew T. May 29 '16 at 14:28
  • 1
    It's because News & Weather (tried v. 2.3.3) specifies the component explicitly in the intent: START u0 {act=android.intent.action.VIEW dat=http://news.google.com/... flg=0x14002000 cmp=com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (has extras)} from uid 10041 on display 0. Bad style, but it's nothing you can do about this :( – Mikhail Naganov May 31 '16 at 16:37
2

I'm using 7.1.1 android. Open Google application or do a search, click the hamburger in the top left and go into Settings.

Go into Accounts and privacy.

Turn off 'open web pages in app'.

This appears to turn off chrome custom tabs.

  • 3
    This disables custom Tabs in the search application only (possibly other Google apps), but not system-wide. – Keith Twombley Jan 26 '17 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.