# CustomTabsIntent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:customtabs:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#nestedclasses)\|[Constants](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#constants)\|[Fields](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#lfields)\|[Methods](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#)  

# CustomTabsIntent

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
CustomTabsIntent
`  
`

extends Object


``


`

|---|---------------------------------------------|
| java.lang.Object                               ||
| ↳ | android.support.customtabs.CustomTabsIntent |

<br />

*** ** * ** ***

Class holding the[Intent](https://developer.android.com/reference/android/content/Intent.html)and start bundle for a Custom Tabs Activity.

**Note:** The constants below are public for the browser implementation's benefit. You are strongly encouraged to use[CustomTabsIntent.Builder](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder).

<br />

## Summary

|                                                                                                                         ### Nested classes                                                                                                                         ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [CustomTabsIntent.Builder](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder) Builder class for[CustomTabsIntent](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent)objects. |

|                                                                                                                                                                                                                                                                        ### Constants                                                                                                                                                                                                                                                                         ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [EXTRA_ACTION_BUTTON_BUNDLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_ACTION_BUTTON_BUNDLE) Bundle used for adding a custom action button to the custom tab toolbar.                                                                                                                                                                                                                                                                                                                              |
| `String` | [EXTRA_CLOSE_BUTTON_ICON](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_CLOSE_BUTTON_ICON) Extra bitmap that specifies the icon of the back button on the toolbar.                                                                                                                                                                                                                                                                                                                                     |
| `String` | [EXTRA_DEFAULT_SHARE_MENU_ITEM](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_DEFAULT_SHARE_MENU_ITEM) Boolean extra that specifies whether a default share button will be shown in the menu.                                                                                                                                                                                                                                                                                                          |
| `String` | [EXTRA_ENABLE_INSTANT_APPS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_ENABLE_INSTANT_APPS) Extra that specifies whether Instant Apps is enabled.                                                                                                                                                                                                                                                                                                                                                   |
| `String` | [EXTRA_ENABLE_URLBAR_HIDING](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_ENABLE_URLBAR_HIDING) Boolean extra that enables the url bar to hide as the user scrolls down the page                                                                                                                                                                                                                                                                                                                      |
| `String` | [EXTRA_EXIT_ANIMATION_BUNDLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_EXIT_ANIMATION_BUNDLE) Bundle constructed out of[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)that will be running when the[Activity](https://developer.android.com/reference/android/app/Activity.html)that holds the custom tab gets finished.                                                                                                            |
| `String` | [EXTRA_MENU_ITEMS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_MENU_ITEMS) Use an`ArrayList<Bundle>`for specifying menu related params.                                                                                                                                                                                                                                                                                                                                                              |
| `String` | [EXTRA_REMOTEVIEWS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS) Extra that specifies the[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html)showing on the secondary toolbar.                                                                                                                                                                                                                                                                         |
| `String` | [EXTRA_REMOTEVIEWS_CLICKED_ID](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_CLICKED_ID) Extra that specifies which[View](https://developer.android.com/reference/android/view/View.html)has been clicked.                                                                                                                                                                                                                                                                                 |
| `String` | [EXTRA_REMOTEVIEWS_PENDINGINTENT](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_PENDINGINTENT) Extra that specifies the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)to be sent when the user clicks on the[View](https://developer.android.com/reference/android/view/View.html)s that is listed by[EXTRA_REMOTEVIEWS_VIEW_IDS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_VIEW_IDS). |
| `String` | [EXTRA_REMOTEVIEWS_VIEW_IDS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_VIEW_IDS) Extra that specifies an array of[View](https://developer.android.com/reference/android/view/View.html)ids.                                                                                                                                                                                                                                                                                            |
| `String` | [EXTRA_SECONDARY_TOOLBAR_COLOR](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_SECONDARY_TOOLBAR_COLOR) Extra that changes the background color for the secondary toolbar.                                                                                                                                                                                                                                                                                                                              |
| `String` | [EXTRA_SESSION](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_SESSION) Extra used to match the session.                                                                                                                                                                                                                                                                                                                                                                                                |
| `String` | [EXTRA_TINT_ACTION_BUTTON](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_TINT_ACTION_BUTTON) Extra boolean that specifies whether the custom action button should be tinted.                                                                                                                                                                                                                                                                                                                           |
| `String` | [EXTRA_TITLE_VISIBILITY_STATE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_TITLE_VISIBILITY_STATE) Extra (int) that specifies state for showing the page title.                                                                                                                                                                                                                                                                                                                                      |
| `String` | [EXTRA_TOOLBAR_COLOR](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_TOOLBAR_COLOR) Extra that changes the background color for the toolbar.                                                                                                                                                                                                                                                                                                                                                            |
| `String` | [EXTRA_TOOLBAR_ITEMS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_TOOLBAR_ITEMS) Listused for adding items to the top and bottom toolbars.                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [KEY_DESCRIPTION](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#KEY_DESCRIPTION) Key that specifies the content description for the custom action button.                                                                                                                                                                                                                                                                                                                                                    |
| `String` | [KEY_ICON](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#KEY_ICON) Key that specifies the[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)to be used as the image source for the action button.                                                                                                                                                                                                                                                                                 |
| `String` | [KEY_ID](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#KEY_ID) Key that specifies the unique ID for an action button.                                                                                                                                                                                                                                                                                                                                                                                        |
| `String` | [KEY_MENU_ITEM_TITLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#KEY_MENU_ITEM_TITLE) Key for specifying the title of a menu item.                                                                                                                                                                                                                                                                                                                                                                        |
| `String` | [KEY_PENDING_INTENT](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#KEY_PENDING_INTENT) Key that specifies the PendingIntent to launch when the action button or menu item was clicked.                                                                                                                                                                                                                                                                                                                       |
| `int`    | [NO_TITLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#NO_TITLE) Don't show any title.                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `int`    | [SHOW_PAGE_TITLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#SHOW_PAGE_TITLE) Shows the page title and the domain.                                                                                                                                                                                                                                                                                                                                                                                        |
| `int`    | [TOOLBAR_ACTION_BUTTON_ID](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#TOOLBAR_ACTION_BUTTON_ID) The ID allocated to the custom action button that is shown on the toolbar.                                                                                                                                                                                                                                                                                                                                |

|                                                                                                                                                                              ### Fields                                                                                                                                                                               ||
|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public final `[Intent](https://developer.android.com/reference/android/content/Intent.html) | [intent](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#intent) An[Intent](https://developer.android.com/reference/android/content/Intent.html)used to start the Custom Tabs Activity.                                            |
| ` public final `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)      | [startAnimationBundle](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#startAnimationBundle) A[Bundle](https://developer.android.com/reference/android/os/Bundle.html)containing the start animation for the Custom Tabs Activity. |

|                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                              ||
|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int`                                                                           | ` `[getMaxToolbarItems](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#getMaxToolbarItems())`() `                                                                                                                                                                                                                                                                             |
| ` void`                                                                                 | ` `[launchUrl](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#launchUrl(android.content.Context, android.net.Uri))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Uri](https://developer.android.com/reference/android/net/Uri.html)` url) ` Convenience method to launch a Custom Tabs Activity.                              |
| ` static `[Intent](https://developer.android.com/reference/android/content/Intent.html) | ` `[setAlwaysUseBrowserUI](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#setAlwaysUseBrowserUI(android.content.Intent))`(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` intent) ` Adds the necessary flags and extras to signal any browser supporting custom tabs to use the browser UI at all times and avoid showing custom tab like UI. |
| ` static boolean`                                                                       | ` `[shouldAlwaysUseBrowserUI](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#shouldAlwaysUseBrowserUI(android.content.Intent))`(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` intent) ` Whether a browser receiving the given intent should always use browser UI and avoid using any custom tabs UI.                                       |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### EXTRA_ACTION_BUTTON_BUNDLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_ACTION_BUTTON_BUNDLE
```

Bundle used for adding a custom action button to the custom tab toolbar. The client should provide a description, an icon[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)and a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for the button. All three keys must be present.

<br />

Constant Value: "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE"  

### EXTRA_CLOSE_BUTTON_ICON

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_CLOSE_BUTTON_ICON
```

Extra bitmap that specifies the icon of the back button on the toolbar. If the client chooses not to customize it, a default close button will be used.

<br />

Constant Value: "android.support.customtabs.extra.CLOSE_BUTTON_ICON"  

### EXTRA_DEFAULT_SHARE_MENU_ITEM

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_DEFAULT_SHARE_MENU_ITEM
```

Boolean extra that specifies whether a default share button will be shown in the menu.

<br />

Constant Value: "android.support.customtabs.extra.SHARE_MENU_ITEM"  

### EXTRA_ENABLE_INSTANT_APPS

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_ENABLE_INSTANT_APPS
```

Extra that specifies whether Instant Apps is enabled.

<br />

Constant Value: "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS"  

### EXTRA_ENABLE_URLBAR_HIDING

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_ENABLE_URLBAR_HIDING
```

Boolean extra that enables the url bar to hide as the user scrolls down the page

<br />

Constant Value: "android.support.customtabs.extra.ENABLE_URLBAR_HIDING"  

### EXTRA_EXIT_ANIMATION_BUNDLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_EXIT_ANIMATION_BUNDLE
```

Bundle constructed out of[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)that will be running when the[Activity](https://developer.android.com/reference/android/app/Activity.html)that holds the custom tab gets finished. A similar ActivityOptions for creation should be constructed and given to the startActivity() call that launches the custom tab.

<br />

Constant Value: "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE"  

### EXTRA_MENU_ITEMS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_MENU_ITEMS
```

Use an`ArrayList<Bundle>`for specifying menu related params. There should be a separate[Bundle](https://developer.android.com/reference/android/os/Bundle.html)for each custom menu item.

<br />

Constant Value: "android.support.customtabs.extra.MENU_ITEMS"  

### EXTRA_REMOTEVIEWS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_REMOTEVIEWS
```

Extra that specifies the[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html)showing on the secondary toolbar. If this extra is set, the other secondary toolbar configurations will be overriden. The height of the[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html)should not exceed 56dp.

<br />

**See also:**

- [setSecondaryToolbarViews(RemoteViews, int[], PendingIntent)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent))

Constant Value: "android.support.customtabs.extra.EXTRA_REMOTEVIEWS"  

### EXTRA_REMOTEVIEWS_CLICKED_ID

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_REMOTEVIEWS_CLICKED_ID
```

Extra that specifies which[View](https://developer.android.com/reference/android/view/View.html)has been clicked. This extra will be put to the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)sent from Custom Tabs when a view in the[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html)is clicked

<br />

**See also:**

- [setSecondaryToolbarViews(RemoteViews, int[], PendingIntent)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent))

Constant Value: "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_CLICKED_ID"  

### EXTRA_REMOTEVIEWS_PENDINGINTENT

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_REMOTEVIEWS_PENDINGINTENT
```

Extra that specifies the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)to be sent when the user clicks on the[View](https://developer.android.com/reference/android/view/View.html)s that is listed by[EXTRA_REMOTEVIEWS_VIEW_IDS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_VIEW_IDS).

Note when this[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)is triggered, it will have the current url as data field, also the id of the clicked[View](https://developer.android.com/reference/android/view/View.html), specified by[EXTRA_REMOTEVIEWS_CLICKED_ID](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_CLICKED_ID).

<br />

**See also:**

- [setSecondaryToolbarViews(RemoteViews, int[], PendingIntent)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent))

Constant Value: "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT"  

### EXTRA_REMOTEVIEWS_VIEW_IDS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_REMOTEVIEWS_VIEW_IDS
```

Extra that specifies an array of[View](https://developer.android.com/reference/android/view/View.html)ids. When these[View](https://developer.android.com/reference/android/view/View.html)s are clicked, a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)will be sent, carrying the current url of the custom tab as data.

Note that Custom Tabs will override the default onClick behavior of the listed[View](https://developer.android.com/reference/android/view/View.html)s. If you do not care about the current url, you can safely ignore this extra and use[setOnClickPendingIntent(int, PendingIntent)](https://developer.android.com/reference/android/widget/RemoteViews.html#setOnClickPendingIntent(int, android.app.PendingIntent))instead.

<br />

**See also:**

- [setSecondaryToolbarViews(RemoteViews, int[], PendingIntent)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent))

Constant Value: "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS"  

### EXTRA_SECONDARY_TOOLBAR_COLOR

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SECONDARY_TOOLBAR_COLOR
```

Extra that changes the background color for the secondary toolbar. The value should be an int that specifies a[Color](https://developer.android.com/reference/android/graphics/Color.html), not a resource id.

<br />

Constant Value: "android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR"  

### EXTRA_SESSION

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SESSION
```

Extra used to match the session. This has to be included in the intent to open in a custom tab. This is the same IBinder that gets passed to ICustomTabsService#newSession. Null if there is no need to match any service side sessions with the intent.

<br />

Constant Value: "android.support.customtabs.extra.SESSION"  

### EXTRA_TINT_ACTION_BUTTON

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TINT_ACTION_BUTTON
```

Extra boolean that specifies whether the custom action button should be tinted. Default is false and the action button will not be tinted.

<br />

Constant Value: "android.support.customtabs.extra.TINT_ACTION_BUTTON"  

### EXTRA_TITLE_VISIBILITY_STATE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TITLE_VISIBILITY_STATE
```

Extra (int) that specifies state for showing the page title. Default is[NO_TITLE](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#NO_TITLE).

<br />

Constant Value: "android.support.customtabs.extra.TITLE_VISIBILITY"  

### EXTRA_TOOLBAR_COLOR

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TOOLBAR_COLOR
```

Extra that changes the background color for the toolbar. colorRes is an int that specifies a[Color](https://developer.android.com/reference/android/graphics/Color.html), not a resource id.

<br />

Constant Value: "android.support.customtabs.extra.TOOLBAR_COLOR"  

### EXTRA_TOOLBAR_ITEMS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TOOLBAR_ITEMS
```

Listused for adding items to the top and bottom toolbars. The client should provide an ID, a description, an icon[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)for each item. They may also provide a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)if the item is a button.

<br />

Constant Value: "android.support.customtabs.extra.TOOLBAR_ITEMS"  

### KEY_DESCRIPTION

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String KEY_DESCRIPTION
```

Key that specifies the content description for the custom action button.

<br />

Constant Value: "android.support.customtabs.customaction.DESCRIPTION"  

### KEY_ICON

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String KEY_ICON
```

Key that specifies the[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)to be used as the image source for the action button. The icon should't be more than 24dp in height (No padding needed. The button itself will be 48dp in height) and have a width/height ratio of less than 2.

<br />

Constant Value: "android.support.customtabs.customaction.ICON"  

### KEY_ID

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String KEY_ID
```

Key that specifies the unique ID for an action button. To make a button to show on the toolbar, use[TOOLBAR_ACTION_BUTTON_ID](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#TOOLBAR_ACTION_BUTTON_ID)as its ID.

<br />

Constant Value: "android.support.customtabs.customaction.ID"  

### KEY_MENU_ITEM_TITLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String KEY_MENU_ITEM_TITLE
```

Key for specifying the title of a menu item.

<br />

Constant Value: "android.support.customtabs.customaction.MENU_ITEM_TITLE"  

### KEY_PENDING_INTENT

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String KEY_PENDING_INTENT
```

Key that specifies the PendingIntent to launch when the action button or menu item was clicked. The custom tab will be calling[send()](https://developer.android.com/reference/android/app/PendingIntent.html#send())on clicks after adding the url as data. The client app can call[getDataString()](https://developer.android.com/reference/android/content/Intent.html#getDataString())to get the url.

<br />

Constant Value: "android.support.customtabs.customaction.PENDING_INTENT"  

### NO_TITLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int NO_TITLE
```

Don't show any title. Shows only the domain.

<br />

Constant Value: 0 (0x00000000)  

### SHOW_PAGE_TITLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int SHOW_PAGE_TITLE
```

Shows the page title and the domain.

<br />

Constant Value: 1 (0x00000001)  

### TOOLBAR_ACTION_BUTTON_ID

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int TOOLBAR_ACTION_BUTTON_ID
```

The ID allocated to the custom action button that is shown on the toolbar.

<br />

Constant Value: 0 (0x00000000)

## Fields

### intent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent intent
```

An[Intent](https://developer.android.com/reference/android/content/Intent.html)used to start the Custom Tabs Activity.

<br />

### startAnimationBundle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Bundle startAnimationBundle
```

A[Bundle](https://developer.android.com/reference/android/os/Bundle.html)containing the start animation for the Custom Tabs Activity.

<br />

## Public methods

### getMaxToolbarItems

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getMaxToolbarItems ()
```

<br />

<br />

|                                                                                                                                                                                                                  Returns                                                                                                                                                                                                                   ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | The maximum number of allowed toolbar items for[addToolbarItem(int, Bitmap, String, PendingIntent)](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder#addToolbarItem(int, android.graphics.Bitmap, java.lang.String, android.app.PendingIntent))and[EXTRA_TOOLBAR_ITEMS](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent#EXTRA_TOOLBAR_ITEMS). <br /> |

### launchUrl

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void launchUrl (Context context, 
                Uri url)
```

Convenience method to launch a Custom Tabs Activity.

<br />

|                         Parameters                          ||
|-----------|--------------------------------------------------|
| `context` | `Context`: The source Context. <br />            |
| `url`     | `Uri`: The URL to load in the Custom Tab. <br /> |

### setAlwaysUseBrowserUI

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent setAlwaysUseBrowserUI (Intent intent)
```

Adds the necessary flags and extras to signal any browser supporting custom tabs to use the browser UI at all times and avoid showing custom tab like UI. Calling this with an intent will override any custom tabs related customizations.

<br />

|                                   Parameters                                   ||
|----------|----------------------------------------------------------------------|
| `intent` | `Intent`: The intent to modify for always showing browser UI. <br /> |

|                                                                     Returns                                                                      ||
|-------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | The same intent with the necessary flags and extras added. <br /> |

### shouldAlwaysUseBrowserUI

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean shouldAlwaysUseBrowserUI (Intent intent)
```

Whether a browser receiving the given intent should always use browser UI and avoid using any custom tabs UI.

<br />

|                                    Parameters                                     ||
|----------|-------------------------------------------------------------------------|
| `intent` | `Intent`: The intent to check for the required flags and extras. <br /> |

|                               Returns                                ||
|-----------|-----------------------------------------------------------|
| `boolean` | Whether the browser UI should be used exclusively. <br /> |

-

  ## Annotations

  - [CustomTabsService.Relation](https://developer.android.com/reference/android/support/customtabs/CustomTabsService.Relation)
  - [CustomTabsService.Result](https://developer.android.com/reference/android/support/customtabs/CustomTabsService.Result)
-

  ## Classes

  - [CustomTabsCallback](https://developer.android.com/reference/android/support/customtabs/CustomTabsCallback)
  - [CustomTabsClient](https://developer.android.com/reference/android/support/customtabs/CustomTabsClient)
  - [CustomTabsIntent](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent)
  - [CustomTabsIntent.Builder](https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder)
  - [CustomTabsService](https://developer.android.com/reference/android/support/customtabs/CustomTabsService)
  - [CustomTabsServiceConnection](https://developer.android.com/reference/android/support/customtabs/CustomTabsServiceConnection)
  - [CustomTabsSession](https://developer.android.com/reference/android/support/customtabs/CustomTabsSession)
  - [CustomTabsSessionToken](https://developer.android.com/reference/android/support/customtabs/CustomTabsSessionToken)
  - [PostMessageService](https://developer.android.com/reference/android/support/customtabs/PostMessageService)
  - [PostMessageServiceConnection](https://developer.android.com/reference/android/support/customtabs/PostMessageServiceConnection)
  - [R](https://developer.android.com/reference/android/support/customtabs/R)
  - [R.anim](https://developer.android.com/reference/android/support/customtabs/R.anim)
  - [R.attr](https://developer.android.com/reference/android/support/customtabs/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/customtabs/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/customtabs/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/customtabs/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/customtabs/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/customtabs/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/customtabs/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/customtabs/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/customtabs/R.string)
  - [R.style](https://developer.android.com/reference/android/support/customtabs/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/customtabs/R.styleable)
  - [TrustedWebUtils](https://developer.android.com/reference/android/support/customtabs/TrustedWebUtils)