# Chrome Custom Tabs in Android

DevFeed: [Chrome Custom Tabs in Android](<https://devfeed.tech/articles/chrome-custom-tabs-in-android-25832.md>)

Original publisher: [Read original article](<https://segunfamisa.com/posts/chrome-custom-tabs>)

Author: Segun Famisa

Published: 2016-06-04T08:05:30Z

Content type: tutorial

Language: en

Sources: [Segun Famisa](<https://devfeed.tech/sources/segun-famisa.md>)

Topics: [in-app-browsers](<https://devfeed.tech/topics/in-app-browsers.md>), [Google Chrome](<https://devfeed.tech/topics/google-chrome.md>), [Android](<https://devfeed.tech/topics/android.md>), [WebView](<https://devfeed.tech/topics/webview.md>), [browser](<https://devfeed.tech/topics/browser.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [X (Twitter)](<https://devfeed.tech/topics/twitter.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [browsing](<https://devfeed.tech/tags/browsing.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [look-and-feel](<https://devfeed.tech/tags/look-and-feel.md>), [webview](<https://devfeed.tech/tags/webview.md>)

## AI overview

Chrome Custom Tabs offer a middle ground between opening links in an external browser, which creates a large app-to-web context switch, and using a WebView, which the excerpt says takes technical work and gives users a less familiar browsing experience. A Custom Tab loads Chrome within the app and can make the transition feel more seamless. The excerpt lists toolbar color, enter and exit animations, and custom actions in Chrome's toolbar, overflow menu, and bottom toolbar as configurable options. It begins setup instructions by mentioning an app-level dependency and opening a tab with a URL, but cuts off before giving the dependency details or complete steps.

## Source excerpt

Introduction I have been seeing a behaviour in some apps for a while, and I've always wanted to know how it was done. I noticed some apps that allow to view urls within the app, used something that is "Powered by Chrome". I first noticed this on the Twitter for Android app, then on Medium, then Feedly. I was interested in knowing how these worked, but I didn't know what to search for. Finally, a few weeks ago, I stumbled on "Chrome Custom Tabs". Alas, that was what I was looking for. In this post, I'm going to explain why, when and how to use "Chrome Custom Tabs" in your Android applications. Why use Chrome Custom tabs? When building apps, developers are usually faced with difficult tradeoffs to make when we have to show web content in our Android apps. Very common and easy solution is to open links externally. If you do this, then these lines of code will look familiar: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(browserIntent); This typically results in a heavy-weight transition between the app and web. Launching a browser from your app to view web content results in a huge context switch which isn't customizable, and hence could lead to a terrible experience. An improvement on this experience will be to use a WebView which is essentially an Android view that displays web pages. However, this options requires technical work to implement and delivers a browsing experience that the users aren't used to. To solve this problem, the Google Chrome team introduced a new feature last September, called custom tabs. This allows to load a chrome tab within your app, and also allows you customize the look and feel of Chrome thereby making the transition between your app and the web content fast & seamless for your users. This is Chrome Custom tab in action on Twitter for Android app: Chrome Custom tab allows you customize the experience of Chrome. It allows you customize: Toolbar color Enter and exit animations Add custom actions to th