Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Builder

*** ** * ** ***

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.hardware.input.AppCustomizationAction.Builder](https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#) |

Builder for `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#Builder(android.content.ComponentName,%20kotlin.String)(component: https://developer.android.com/reference/kotlin/android/content/ComponentName.html#, action: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Creates a new Builder for an `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction` targeting the specified component and action. |

| Public methods ||
|---|---|
| [AppCustomizationAction](https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction) | `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction`. |
| [AppCustomizationAction.Builder](https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#setData(android.net.Uri)(data: https://developer.android.com/reference/kotlin/android/net/Uri.html#?)` Sets the intent data URI. |

## Public constructors

### Builder

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
Builder(
    component: ComponentName, 
    action: String)
```

Creates a new Builder for an `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction` targeting the specified component and action.

| Parameters ||
|---|---|
| `component` | [ComponentName](https://developer.android.com/reference/kotlin/android/content/ComponentName.html#): The target `https://developer.android.com/reference/kotlin/android/content/ComponentName.html#` to be launched. Must not be `null`. |
| `action` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The intent action to set. Only ACTION_MAIN and ACTION_VIEW are supported. Must not be `null`. |

| Exceptions ||
|---|---|
| `java.lang.IllegalArgumentException` | if action is not ACTION_MAIN or ACTION_VIEW. |
| `java.lang.NullPointerException` | if component or action is `null`. |

## Public methods

### build

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun build(): AppCustomizationAction
```

Builds the `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction`.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction` | The built AppCustomizationAction. This value cannot be `null`. |

### setData

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setData(data: Uri?): AppCustomizationAction.Builder
```

Sets the intent data URI. This field is optional.

| Parameters ||
|---|---|
| `data` | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?: The data URI to set. This value may be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/input/AppCustomizationAction.Builder#` | This builder. This value cannot be `null`. |