# CustomContentAction.Builder

Artifact: [androidx.browser:browser](https://developer.android.com/jetpack/androidx/releases/browser) [View Source](https://cs.android.com/search?q=file:androidx/browser/customtabs/CustomContentAction.java+class:androidx.browser.customtabs.CustomContentAction.Builder) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

*** ** * ** ***


```
class CustomContentAction.Builder
```

<br />

*** ** * ** ***

Builder class for `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction.Builder#Builder(int,java.lang.String,android.app.PendingIntent,int)( id: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html, targetType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Creates a new Builder for `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` instance. |

## Public constructors

### Builder

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
Builder(
    id: @IntRange(from = 0) Int,
    label: String,
    pendingIntent: PendingIntent,
    targetType: Int
)
```

Creates a new Builder for `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction`.

| Parameters |
|---|---|
| `id: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A unique integer ID for this action. This ID will be sent back to your application when the action is triggered. It should be unique among all custom content actions added to a single `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent`. |
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The user-visible label for this action (e.g., "Pin Image", "Share Link with App X"). The browser will display this text, but may truncate or otherwise alter it to fit its own UI limitations, which can vary between browsers. |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | The `https://developer.android.com/reference/android/app/PendingIntent.html` to be sent when this action is triggered. |
| `targetType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The type of content this action applies to (e.g., `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CONTENT_TARGET_TYPE_IMAGE()` or `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CONTENT_TARGET_TYPE_LINK()`). |

## Public functions

### build

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun build(): CustomContentAction
```

Builds the `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` instance.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` | The built `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction`. |