public final class

CustomTabsIntent.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.browser.customtabs.CustomTabsIntent.Builder

Overview

Builder class for CustomTabsIntent objects.

Summary

Constructors
publicBuilder()

Creates a CustomTabsIntent.Builder object associated with no CustomTabsSession.

publicBuilder(CustomTabsSession session)

Creates a CustomTabsIntent.Builder object associated with a given CustomTabsSession.

Methods
public CustomTabsIntent.BuilderaddDefaultShareMenuItem()

Adds a default share item to the menu.

public CustomTabsIntent.BuilderaddMenuItem(java.lang.String label, PendingIntent pendingIntent)

Adds a menu item.

public CustomTabsIntent.BuilderaddToolbarItem(int id, Bitmap icon, java.lang.String description, PendingIntent pendingIntent)

Adds an action button to the custom tab.

public CustomTabsIntentbuild()

Combines all the options that have been set and returns a new CustomTabsIntent object.

public CustomTabsIntent.BuilderenableUrlBarHiding()

Enables the url bar to hide as the user scrolls down on the page.

public CustomTabsIntent.BuildersetActionButton(Bitmap icon, java.lang.String description, PendingIntent pendingIntent)

Sets the action button that is displayed in the Toolbar with default tinting behavior.

public CustomTabsIntent.BuildersetActionButton(Bitmap icon, java.lang.String description, PendingIntent pendingIntent, boolean shouldTint)

Sets the action button that is displayed in the Toolbar.

public CustomTabsIntent.BuildersetActivitySideSheetBreakpointDp(int breakpointDp)

Sets the Custom Tab Activity's transition breakpoint in DP.

public CustomTabsIntent.BuildersetActivitySideSheetDecorationType(int decorationType)

Sets the Custom Tab Activity's decoration type that will be displayed when it is acting as a side sheet.

public CustomTabsIntent.BuildersetActivitySideSheetMaximizationEnabled(boolean enabled)

Enables or disables the maximization button for when the Custom Tab Activity is acting as a side sheet.

public CustomTabsIntent.BuildersetActivitySideSheetPosition(int position)

Sets the Custom Tab Activity's position when acting as a side sheet.

public CustomTabsIntent.BuildersetActivitySideSheetRoundedCornersPosition(int roundedCornersPosition)

Sets the Custom Tab Activity's rounded corners position when it is acting as a side sheet.

public CustomTabsIntent.BuildersetBackgroundInteractionEnabled(boolean enabled)

Enables the capability of the interaction with background.

public CustomTabsIntent.BuildersetBookmarksButtonEnabled(boolean enabled)

Enables or disables the bookmarks button in the overflow menu.

public CustomTabsIntent.BuildersetCloseButtonIcon(Bitmap icon)

Sets the Close button icon for the custom tab.

public CustomTabsIntent.BuildersetCloseButtonPosition(int position)

Sets the position of the close button.

public CustomTabsIntent.BuildersetColorScheme(int colorScheme)

Sets the color scheme that should be applied to the user interface in the custom tab.

public CustomTabsIntent.BuildersetColorSchemeParams(int colorScheme, CustomTabColorSchemeParams params)

Sets CustomTabColorSchemeParams for the given color scheme.

public CustomTabsIntent.BuildersetDefaultColorSchemeParams(CustomTabColorSchemeParams params)

Sets the default CustomTabColorSchemeParams.

public CustomTabsIntent.BuildersetDefaultShareMenuItemEnabled(boolean enabled)

Set whether a default share item is added to the menu.

public CustomTabsIntent.BuildersetDownloadButtonEnabled(boolean enabled)

Enables or disables the download button in the overflow menu.

public CustomTabsIntent.BuildersetExitAnimations(Context context, int enterResId, int exitResId)

Sets the exit animations.

public CustomTabsIntent.BuildersetInitialActivityHeightPx(int initialHeightPx)

Sets the Custom Tab Activity's initial height in pixels with default resize behavior.

public CustomTabsIntent.BuildersetInitialActivityHeightPx(int initialHeightPx, int activityHeightResizeBehavior)

Sets the Custom Tab Activity's initial height in pixels and the desired resize behavior.

public CustomTabsIntent.BuildersetInitialActivityWidthPx(int initialWidthPx)

Sets the Custom Tab Activity's initial width in pixels.

public CustomTabsIntent.BuildersetInstantAppsEnabled(boolean enabled)

Sets whether Instant Apps is enabled for this Custom Tab.

public CustomTabsIntent.BuildersetNavigationBarColor(int color)

Sets the navigation bar color.

public CustomTabsIntent.BuildersetNavigationBarDividerColor(int color)

Sets the navigation bar divider color.

public CustomTabsIntent.BuildersetPendingSession(CustomTabsSession.PendingSession session)

Associates the with the given CustomTabsSession.PendingSession.

public CustomTabsIntent.BuildersetSecondaryToolbarColor(int color)

Sets the color of the secondary toolbar.

public CustomTabsIntent.BuildersetSecondaryToolbarSwipeUpGesture(PendingIntent pendingIntent)

Sets the PendingIntent to be sent when the user swipes up from the secondary (bottom) toolbar.

public CustomTabsIntent.BuildersetSecondaryToolbarViews(RemoteViews remoteViews, int[] clickableIDs[], PendingIntent pendingIntent)

Sets the remote views displayed in the secondary toolbar in a custom tab.

public CustomTabsIntent.BuildersetSendToExternalDefaultHandlerEnabled(boolean enabled)

Enables sending initial urls to external handler apps, if possible.

public CustomTabsIntent.BuildersetSession(CustomTabsSession session)

Associates the with the given CustomTabsSession.

public CustomTabsIntent.BuildersetShareIdentityEnabled(boolean enabled)

Allow Custom Tabs to obtain the caller's identity i.e.

public CustomTabsIntent.BuildersetShareState(int shareState)

Sets the share state that should be applied to the custom tab.

public CustomTabsIntent.BuildersetShowTitle(boolean showTitle)

Sets whether the title should be shown in the custom tab.

public CustomTabsIntent.BuildersetStartAnimations(Context context, int enterResId, int exitResId)

Sets the start animations.

public CustomTabsIntent.BuildersetToolbarColor(int color)

Sets the toolbar color.

public CustomTabsIntent.BuildersetToolbarCornerRadiusDp(int cornerRadiusDp)

Sets the toolbar's top corner radii in dp.

public CustomTabsIntent.BuildersetTranslateLocale(java.util.Locale locale)

Specifies the target locale the Translate UI should be triggered with.

public CustomTabsIntent.BuildersetUrlBarHidingEnabled(boolean enabled)

Set whether the url bar should hide as the user scrolls down on the page.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a CustomTabsIntent.Builder object associated with no CustomTabsSession.

public Builder(CustomTabsSession session)

Creates a CustomTabsIntent.Builder object associated with a given CustomTabsSession. Guarantees that the will be sent to the same component as the one the session is associated with.

Parameters:

session: The session to associate this Builder with.

Methods

public CustomTabsIntent.Builder setSession(CustomTabsSession session)

Associates the with the given CustomTabsSession. Guarantees that the will be sent to the same component as the one the session is associated with.

Associates the with the given CustomTabsSession.PendingSession. Overrides the effect of CustomTabsIntent.Builder.setSession(CustomTabsSession).

public CustomTabsIntent.Builder setToolbarColor(int color)

Deprecated: Use CustomTabsIntent.Builder.setDefaultColorSchemeParams(CustomTabColorSchemeParams) instead.

Sets the toolbar color. On Android L and above, this color is also applied to the status bar. To ensure good contrast between status bar icons and the background, Custom Tab implementations may use View on Android M and above, and use a darkened color for the status bar on Android L. Can be overridden for particular color schemes, see CustomTabsIntent.Builder.setColorSchemeParams(int, CustomTabColorSchemeParams).

Parameters:

color:

public CustomTabsIntent.Builder enableUrlBarHiding()

Deprecated: Use CustomTabsIntent.Builder.setUrlBarHidingEnabled(boolean) instead.

Enables the url bar to hide as the user scrolls down on the page.

public CustomTabsIntent.Builder setUrlBarHidingEnabled(boolean enabled)

Set whether the url bar should hide as the user scrolls down on the page.

Parameters:

enabled: Whether url bar hiding is enabled.

public CustomTabsIntent.Builder setCloseButtonIcon(Bitmap icon)

Sets the Close button icon for the custom tab.

Parameters:

icon: The icon Bitmap

public CustomTabsIntent.Builder setShowTitle(boolean showTitle)

Sets whether the title should be shown in the custom tab.

Parameters:

showTitle: Whether the title should be shown.

public CustomTabsIntent.Builder addMenuItem(java.lang.String label, PendingIntent pendingIntent)

Adds a menu item.

Parameters:

label: Menu label.
pendingIntent: Pending intent delivered when the menu item is clicked.

public CustomTabsIntent.Builder addDefaultShareMenuItem()

Deprecated: Use CustomTabsIntent.Builder.setShareState(int) instead. This will set the share state to CustomTabsIntent.SHARE_STATE_ON.

Adds a default share item to the menu.

public CustomTabsIntent.Builder setDefaultShareMenuItemEnabled(boolean enabled)

Deprecated: Use CustomTabsIntent.Builder.setShareState(int) instead. This will set the share state to CustomTabsIntent.SHARE_STATE_ON or CustomTabsIntent.SHARE_STATE_OFF based on enabled.

Set whether a default share item is added to the menu.

Parameters:

enabled: Whether default share item is added.

public CustomTabsIntent.Builder setShareState(int shareState)

Sets the share state that should be applied to the custom tab.

Parameters:

shareState: Desired share state.

See also: CustomTabsIntent.SHARE_STATE_DEFAULT, CustomTabsIntent.SHARE_STATE_ON, CustomTabsIntent.SHARE_STATE_OFF

public CustomTabsIntent.Builder setActionButton(Bitmap icon, java.lang.String description, PendingIntent pendingIntent, boolean shouldTint)

Sets the action button that is displayed in the Toolbar.

This is equivalent to calling CustomTabsIntent.Builder.addToolbarItem(int, Bitmap, String, PendingIntent) with CustomTabsIntent.TOOLBAR_ACTION_BUTTON_ID as id.

Parameters:

icon: The icon.
description: The description for the button. To be used for accessibility.
pendingIntent: pending intent delivered when the button is clicked.
shouldTint: Whether the action button should be tinted..

See also: CustomTabsIntent.Builder.addToolbarItem(int, Bitmap, String, PendingIntent)

public CustomTabsIntent.Builder setActionButton(Bitmap icon, java.lang.String description, PendingIntent pendingIntent)

Sets the action button that is displayed in the Toolbar with default tinting behavior.

See also: CustomTabsIntent.Builder.setActionButton(Bitmap, String, PendingIntent, boolean)

public CustomTabsIntent.Builder addToolbarItem(int id, Bitmap icon, java.lang.String description, PendingIntent pendingIntent)

Deprecated: Use CustomTabsIntent.Builder#setSecondaryToolbarViews(RemoteViews, int[], PendingIntent).

Adds an action button to the custom tab. Multiple buttons can be added via this method. If the given id equals CustomTabsIntent.TOOLBAR_ACTION_BUTTON_ID, the button will be placed on the toolbar; if the bitmap is too wide, it will be put to the bottom bar instead. If the id is not CustomTabsIntent.TOOLBAR_ACTION_BUTTON_ID, it will be directly put on secondary toolbar. The maximum number of allowed toolbar items in a single intent is CustomTabsIntent.getMaxToolbarItems(). Throws an java.lang.IllegalStateException when that number is exceeded per intent.

Parameters:

id: The unique id of the action button. This should be non-negative.
icon: The icon.
description: The description for the button. To be used for accessibility.
pendingIntent: The pending intent delivered when the button is clicked.

See also: CustomTabsIntent.getMaxToolbarItems()

public CustomTabsIntent.Builder setSecondaryToolbarColor(int color)

Deprecated: Use CustomTabsIntent.Builder.setDefaultColorSchemeParams(CustomTabColorSchemeParams) instead.

Sets the color of the secondary toolbar. Can be overridden for particular color schemes, see CustomTabsIntent.Builder.setColorSchemeParams(int, CustomTabColorSchemeParams).

Parameters:

color: The color for the secondary toolbar.

public CustomTabsIntent.Builder setNavigationBarColor(int color)

Deprecated: Use CustomTabsIntent.Builder.setDefaultColorSchemeParams(CustomTabColorSchemeParams) instead.

Sets the navigation bar color. Has no effect on API versions below L. To ensure good contrast between navigation bar icons and the background, Custom Tab implementations may use View on Android O and above, and darken the provided color on Android L-N. Can be overridden for particular color schemes, see CustomTabsIntent.Builder.setColorSchemeParams(int, CustomTabColorSchemeParams).

Parameters:

color: The color for the navigation bar.

public CustomTabsIntent.Builder setNavigationBarDividerColor(int color)

Deprecated: Use CustomTabsIntent.Builder.setDefaultColorSchemeParams(CustomTabColorSchemeParams) instead.

Sets the navigation bar divider color. Has no effect on API versions below P. Can be overridden for particular color schemes, see CustomTabsIntent.Builder.setColorSchemeParams(int, CustomTabColorSchemeParams).

Parameters:

color: The color for the navigation bar divider.

public CustomTabsIntent.Builder setSecondaryToolbarViews(RemoteViews remoteViews, int[] clickableIDs[], PendingIntent pendingIntent)

Sets the remote views displayed in the secondary toolbar in a custom tab.

Parameters:

remoteViews: The that will be shown on the secondary toolbar.
clickableIDs: The IDs of clickable views. The onClick event of these views will be handled by custom tabs.
pendingIntent: The PendingIntent that will be sent when the user clicks on one of the Views in clickableIDs. When the PendingIntent is sent, it will have the current URL as its intent data.

See also: CustomTabsIntent.EXTRA_REMOTEVIEWS, CustomTabsIntent.EXTRA_REMOTEVIEWS_VIEW_IDS, CustomTabsIntent.EXTRA_REMOTEVIEWS_PENDINGINTENT, CustomTabsIntent.EXTRA_REMOTEVIEWS_CLICKED_ID

public CustomTabsIntent.Builder setSecondaryToolbarSwipeUpGesture(PendingIntent pendingIntent)

Sets the PendingIntent to be sent when the user swipes up from the secondary (bottom) toolbar.

Parameters:

pendingIntent: The PendingIntent that will be sent when the user swipes up from the secondary toolbar.

public CustomTabsIntent.Builder setInstantAppsEnabled(boolean enabled)

Sets whether Instant Apps is enabled for this Custom Tab.

Parameters:

enabled: Whether Instant Apps should be enabled.

public CustomTabsIntent.Builder setStartAnimations(Context context, int enterResId, int exitResId)

Sets the start animations.

Parameters:

context: Application context.
enterResId: Resource ID of the "enter" animation for the browser.
exitResId: Resource ID of the "exit" animation for the application.

public CustomTabsIntent.Builder setExitAnimations(Context context, int enterResId, int exitResId)

Sets the exit animations.

Parameters:

context: Application context.
enterResId: Resource ID of the "enter" animation for the application.
exitResId: Resource ID of the "exit" animation for the browser.

public CustomTabsIntent.Builder setColorScheme(int colorScheme)

Sets the color scheme that should be applied to the user interface in the custom tab.

Parameters:

colorScheme: Desired color scheme.

See also: CustomTabsIntent.COLOR_SCHEME_SYSTEM, CustomTabsIntent.COLOR_SCHEME_LIGHT, CustomTabsIntent.COLOR_SCHEME_DARK

public CustomTabsIntent.Builder setColorSchemeParams(int colorScheme, CustomTabColorSchemeParams params)

Sets CustomTabColorSchemeParams for the given color scheme. This allows specifying two different toolbar colors for light and dark schemes. It can be useful if CustomTabsIntent.COLOR_SCHEME_SYSTEM is set: Custom Tabs will follow the system settings and apply the corresponding CustomTabColorSchemeParams "on the fly" when the settings change. If there is no CustomTabColorSchemeParams for the current scheme, or a particular field of it is null, Custom Tabs will fall back to the defaults provided via CustomTabsIntent.Builder.setDefaultColorSchemeParams(CustomTabColorSchemeParams). Example:


     CustomTabColorSchemeParams darkParams = new CustomTabColorSchemeParams.Builder()
             .setToolbarColor(darkColor)
             .build();
     CustomTabColorSchemeParams otherParams = new CustomTabColorSchemeParams.Builder()
             .setNavigationBarColor(otherColor)
             .build();
     CustomTabIntent intent = new CustomTabIntent.Builder()
             .setColorScheme(COLOR_SCHEME_SYSTEM)
             .setColorSchemeParams(COLOR_SCHEME_DARK, darkParams)
             .setDefaultColorSchemeParams(otherParams)
             .build();
 

Parameters:

colorScheme: A constant representing a color scheme (see CustomTabsIntent.Builder.setColorScheme(int)). It should not be CustomTabsIntent.COLOR_SCHEME_SYSTEM, because that represents a behavior rather than a particular color scheme.
params: An instance of CustomTabColorSchemeParams.

public CustomTabsIntent.Builder setDefaultColorSchemeParams(CustomTabColorSchemeParams params)

Sets the default CustomTabColorSchemeParams. This will set a default color scheme that applies when no CustomTabColorSchemeParams specified for current color scheme via CustomTabsIntent.Builder.setColorSchemeParams(int, CustomTabColorSchemeParams).

Parameters:

params: An instance of CustomTabColorSchemeParams.

public CustomTabsIntent.Builder setInitialActivityHeightPx(int initialHeightPx, int activityHeightResizeBehavior)

Sets the Custom Tab Activity's initial height in pixels and the desired resize behavior. The Custom Tab will behave as a bottom sheet if the screen's width is smaller than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp(int).

Parameters:

initialHeightPx: The Custom Tab Activity's initial height in pixels.
activityHeightResizeBehavior: Desired height behavior.

See also: CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_HEIGHT_PX, CustomTabsIntent.EXTRA_ACTIVITY_HEIGHT_RESIZE_BEHAVIOR, CustomTabsIntent.ACTIVITY_HEIGHT_DEFAULT, CustomTabsIntent.ACTIVITY_HEIGHT_ADJUSTABLE, CustomTabsIntent.ACTIVITY_HEIGHT_FIXED

public CustomTabsIntent.Builder setInitialActivityHeightPx(int initialHeightPx)

Sets the Custom Tab Activity's initial height in pixels with default resize behavior. The Custom Tab will behave as a bottom sheet if the screen's width is smaller than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp(int).

See also: CustomTabsIntent.Builder.setInitialActivityHeightPx(int, int)

public CustomTabsIntent.Builder setInitialActivityWidthPx(int initialWidthPx)

Sets the Custom Tab Activity's initial width in pixels. The Custom Tab will behave as a side sheet if the screen's width is bigger than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp(int) and the screen is big enough, see doc for CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_WIDTH_PX.

Parameters:

initialWidthPx: The Custom Tab Activity's initial width in pixels.

See also: CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_WIDTH_PX

public CustomTabsIntent.Builder setActivitySideSheetBreakpointDp(int breakpointDp)

Sets the Custom Tab Activity's transition breakpoint in DP.

Parameters:

breakpointDp: The Custom Tab Activity's breakpoint in DP.

See also: CustomTabsIntent.EXTRA_ACTIVITY_SIDE_SHEET_BREAKPOINT_DP

public CustomTabsIntent.Builder setActivitySideSheetMaximizationEnabled(boolean enabled)

Enables or disables the maximization button for when the Custom Tab Activity is acting as a side sheet. The button is disabled by default.

Parameters:

enabled: Whether the maximization button is enabled.

See also: CustomTabsIntent.EXTRA_ACTIVITY_SIDE_SHEET_ENABLE_MAXIMIZATION

public CustomTabsIntent.Builder setActivitySideSheetPosition(int position)

Sets the Custom Tab Activity's position when acting as a side sheet.

Parameters:

position: The Custom Tab Activity's position.

See also: CustomTabsIntent.EXTRA_ACTIVITY_SIDE_SHEET_POSITION, CustomTabsIntent.CLOSE_BUTTON_POSITION_DEFAULT, CustomTabsIntent.CLOSE_BUTTON_POSITION_START, CustomTabsIntent.CLOSE_BUTTON_POSITION_END

public CustomTabsIntent.Builder setActivitySideSheetDecorationType(int decorationType)

Sets the Custom Tab Activity's decoration type that will be displayed when it is acting as a side sheet.

Parameters:

decorationType: The Custom Tab Activity's decoration type.

See also: CustomTabsIntent.EXTRA_ACTIVITY_SIDE_SHEET_DECORATION_TYPE, CustomTabsIntent.ACTIVITY_SIDE_SHEET_DECORATION_TYPE_DEFAULT, CustomTabsIntent.ACTIVITY_SIDE_SHEET_DECORATION_TYPE_NONE, CustomTabsIntent.ACTIVITY_SIDE_SHEET_DECORATION_TYPE_SHADOW, CustomTabsIntent.ACTIVITY_SIDE_SHEET_DECORATION_TYPE_DIVIDER

public CustomTabsIntent.Builder setActivitySideSheetRoundedCornersPosition(int roundedCornersPosition)

Sets the Custom Tab Activity's rounded corners position when it is acting as a side sheet.

Parameters:

roundedCornersPosition: The Custom Tab Activity's rounded corners position.

See also: CustomTabsIntent.EXTRA_ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION, CustomTabsIntent.ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_DEFAULT, CustomTabsIntent.ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_NONE, CustomTabsIntent.ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_TOP

public CustomTabsIntent.Builder setToolbarCornerRadiusDp(int cornerRadiusDp)

Sets the toolbar's top corner radii in dp.

Parameters:

cornerRadiusDp: The toolbar's top corner radii in dp.

See also: CustomTabsIntent.EXTRA_TOOLBAR_CORNER_RADIUS_DP

public CustomTabsIntent.Builder setCloseButtonPosition(int position)

Sets the position of the close button.

Parameters:

position: The desired position.

See also: CustomTabsIntent.CLOSE_BUTTON_POSITION_DEFAULT, CustomTabsIntent.CLOSE_BUTTON_POSITION_START, CustomTabsIntent.CLOSE_BUTTON_POSITION_END

public CustomTabsIntent.Builder setBookmarksButtonEnabled(boolean enabled)

Enables or disables the bookmarks button in the overflow menu. The button is enabled by default.

Parameters:

enabled: Whether the start button is enabled.

See also: CustomTabsIntent.EXTRA_DISABLE_BOOKMARKS_BUTTON

public CustomTabsIntent.Builder setDownloadButtonEnabled(boolean enabled)

Enables or disables the download button in the overflow menu. The button is enabled by default.

Parameters:

enabled: Whether the download button is enabled.

See also: CustomTabsIntent.EXTRA_DISABLE_DOWNLOAD_BUTTON

public CustomTabsIntent.Builder setSendToExternalDefaultHandlerEnabled(boolean enabled)

Enables sending initial urls to external handler apps, if possible.

Parameters:

enabled: Whether to send urls to external handler.

See also: CustomTabsIntent.EXTRA_SEND_TO_EXTERNAL_DEFAULT_HANDLER

public CustomTabsIntent.Builder setTranslateLocale(java.util.Locale locale)

Specifies the target locale the Translate UI should be triggered with.

Parameters:

locale: java.util.Locale object that represents the target locale.

See also: CustomTabsIntent.EXTRA_TRANSLATE_LANGUAGE_TAG

public CustomTabsIntent.Builder setBackgroundInteractionEnabled(boolean enabled)

Enables the capability of the interaction with background. Enables the interactions with the background app when a Partial Custom Tab is launched.

Parameters:

enabled: Whether the background interaction is enabled.

See also: CustomTabsIntent.EXTRA_DISABLE_BACKGROUND_INTERACTION

public CustomTabsIntent.Builder setShareIdentityEnabled(boolean enabled)

Allow Custom Tabs to obtain the caller's identity i.e. package name.

Parameters:

enabled: Whether the identity sharing is enabled.

public CustomTabsIntent build()

Combines all the options that have been set and returns a new CustomTabsIntent object.