# 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: [Chrome](<https://devfeed.tech/topics/chrome.md>), [Android](<https://devfeed.tech/topics/android.md>), [WebView](<https://devfeed.tech/topics/webview.md>), [Google](<https://devfeed.tech/topics/google.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [browser](<https://devfeed.tech/tags/browser.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [code](<https://devfeed.tech/tags/code.md>), [developers](<https://devfeed.tech/tags/developers.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [technical](<https://devfeed.tech/tags/technical.md>), [webview](<https://devfeed.tech/tags/webview.md>)

## AI overview

A tutorial explaining why and how to use Chrome Custom Tabs in Android applications. It compares opening links externally and using WebView, then describes Custom Tabs as a way to display Chrome content within an app with customizable controls and transitions.

## 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