Custom Tabs is an Android mechanism that lets a native app open a web page inside the user’s default browser, presented as a lightweight overlay that carries the app’s color and actions while the browser keeps control of rendering, cookies and security. In mobile web practice, Custom Tabs, often called Chrome Custom Tabs after the browser that introduced the feature in 2015, sit between launching a full external browser and embedding a WebView inside the app.
The design solves a long-standing dilemma for app developers: an external browser breaks the user flow, while an embedded WebView isolates the page from saved logins, autofill and cookies. Custom Tabs keep the flow inside the app and still give the page the browser’s complete state, which is why they are the recommended default for linking to third-party content on Android.
How Custom Tabs hand a page to the browser
A Custom Tab is a browser activity launched by intent, not a view rendered by the host app. The app builds an intent through the AndroidX Browser library, sets visual options such as toolbar color and close button, and asks the browser to open a URL. The browser then draws the page in its own process, with its own sandbox, cookie jar and password manager.
Because the browser owns the page, the host app cannot read or inject into the content. It cannot run JavaScript in the page, read cookies or inspect form fields. That boundary is the core security property: a user signing in through a Custom Tab enters credentials into the browser, not into the app that requested the page.
Custom Tabs also support warm-up and prefetching. The app can bind to a CustomTabsService, call warmup() to start the browser process early and call mayLaunchUrl() to hint at a likely destination. On a typical mid-range phone, these hints can cut perceived opening time by several hundred milliseconds, although the browser may ignore them under memory pressure or data-saver settings.
The following table summarizes the main components involved when an app opens a Custom Tab.
| Component | Role | Owned by |
|---|---|---|
| CustomTabsIntent | Describes the URL and visual options | Host app |
| CustomTabsService | Accepts warm-up and prefetch hints | Browser |
| CustomTabsSession | Links callbacks and navigation events to the app | Shared |
| Rendering engine | Loads, sandboxes and draws the page | Browser |
| Cookie and credential store | Keeps logins, autofill and site data | Browser |
Customization options and their limits
Custom Tabs allow branding without ownership of the page. The app can adjust the frame around the content, but the browser decides what the page looks like and always shows the URL or origin in the toolbar, which helps users detect phishing.
The options below are commonly available in current versions of the AndroidX Browser library; support depends on the browser version installed on the device.
| Setting | What it changes | Practical note |
|---|---|---|
| Toolbar color scheme | Color of the top bar in light and dark mode | Match the app theme for continuity |
| Close button icon | Icon that returns the user to the app | A back arrow suits flows that feel nested |
| Action button | One custom icon in the toolbar | Useful for share or bookmark actions |
| Menu items | Extra entries in the overflow menu | Keep the list short |
| Enter and exit animations | Transition between app and tab | Slide animations feel native |
| Partial height tab | Bottom sheet instead of full screen | Requires a recent browser version |
The partial Custom Tab, introduced in Chrome around 2022, opens the page in a resizable bottom sheet so the app remains visible above it. It suits short tasks such as reading a policy or confirming a payment, but not every browser supports it, so the code must handle a fallback to the full-screen tab.
Custom Tabs compared with WebView and related options
Custom Tabs are one of several ways an app can display web content, and the right choice depends on who owns the content and who needs control. The neighboring options are the WebView, the Trusted Web Activity, the external browser and, on iOS, SFSafariViewController.
| Option | Shares browser state | App can modify page | Best suited for |
|---|---|---|---|
| Custom Tabs | Yes | No | Third-party links and sign-in |
| WebView | No | Yes | App-owned content tightly integrated with native code |
| Trusted Web Activity | Yes | No | Full-screen Progressive Web Apps verified by domain |
| External browser | Yes | No | Content the user wants to keep in the browser |
| SFSafariViewController | Partly | No | The iOS counterpart for third-party links |
A Trusted Web Activity is technically built on the Custom Tabs protocol but hides the browser toolbar entirely. It requires Digital Asset Links verification, proving that the app and the website share an owner. Ordinary Custom Tabs need no verification because the visible URL bar keeps the user informed.
Custom Tabs also differ from the generic in-app browser that many social apps build on WebView. Those in-app browsers can inject scripts and track activity, which raises privacy concerns, whereas Custom Tabs keep the page isolated from the host app by design.
When to choose Custom Tabs
Custom Tabs are the default choice for OAuth and single sign-on on Android. Current guidance for native apps, including the OAuth 2.0 best practice for native apps (RFC 8252), recommends an external user agent such as a Custom Tab rather than an embedded WebView, because the app must never see the user’s password.
The decision table below maps common scenarios to a recommended approach.
| Scenario | Recommended option | Reason |
|---|---|---|
| Sign-in with an identity provider | Custom Tabs | Credentials stay in the browser |
| Opening a news article link | Custom Tabs | Fast, familiar and keeps the user in the app |
| Help pages bundled with the app | WebView | Content needs native bridges and offline storage |
| Shipping a PWA in the Play Store | Trusted Web Activity | Full-screen display with verified ownership |
| No compatible browser installed | External browser or WebView | Custom Tabs cannot launch |
Limitations and common mistakes
Custom Tabs depend on the browser installed on the device. Chrome, Firefox, Samsung Internet, Edge and several other browsers implement the protocol, but the depth of support varies, and some features exist only in recent Chrome releases. Developers should always check for a supporting package before launching.
- Assuming Chrome is present: on devices without Google services the default browser may lack support, so a fallback is mandatory.
- Expecting page control: apps cannot read results from the page except through redirects to a registered app link or custom scheme.
- Skipping warm-up: launching without
warmup()wastes an easy latency gain on cold starts. - Overloading the toolbar: too many menu items make the tab feel cluttered and confuse users about which app they are in.
- Ignoring Android 11 package visibility: since Android 11, apps must declare queries in the manifest to detect browsers that support Custom Tabs.
In simple terms
Custom Tabs let an Android app open a web page without sending you away and without building its own small browser. The page opens inside your real browser, but it looks like part of the app, with the app’s colors at the top.
Think of it as a guest window: the app opens the window for you, but the browser runs everything behind it. Your saved passwords and logins still work, and the app cannot see what you type on the page.
A practical example
A regional bank’s Android app lets customers link an external investment account through the provider’s web sign-in page. The first version used an embedded WebView, and support staff saw frequent complaints: customers had to retype passwords, password managers did not fill the form, and a security review flagged that the app could technically capture credentials.
The team switched the flow to Custom Tabs. The app calls warmup() when the user opens the linking screen, hints the sign-in URL with mayLaunchUrl(), and opens the tab with the bank’s toolbar color. After sign-in, the provider redirects to a verified app link that returns the user to the app with an authorization code.
The result was a simpler and safer sign-in flow: password managers filled the form, users already signed in to the provider skipped the login step entirely, and the security review closed because credentials never passed through the app.