# ActionBuilders.AndroidActivity.Builder

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ActionBuilders.java+class:androidx.wear.protolayout.ActionBuilders.AndroidActivity.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public final class ActionBuilders.AndroidActivity.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder#Builder()()` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder#addKeyToExtraMapping(java.lang.String,androidx.wear.protolayout.ActionBuilders.AndroidExtra)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html key, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidExtra extra )` Adds an entry into the extras to be included in the intent. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity` | `https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder#build()()` Builds an instance from accumulated values. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder#setClassName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html className)` Sets the fully qualified class name (including the package) to send the intent to, for example, "com.example.weather.WeatherOverviewActivity". |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder#setPackageName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html packageName)` Sets the package name to send the intent to, for example, "com.example.weather". |

## Public constructors

### Builder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public Builder()
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.AndroidActivity.Builder`.

## Public methods

### addKeyToExtraMapping

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull ActionBuilders.AndroidActivity.Builder addKeyToExtraMapping(
    @NonNull String key,
    @NonNull ActionBuilders.AndroidExtra extra
)
```

Adds an entry into the extras to be included in the intent.

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull ActionBuilders.AndroidActivity build()
```

Builds an instance from accumulated values.

### setClassName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull ActionBuilders.AndroidActivity.Builder setClassName(@NonNull String className)
```

Sets the fully qualified class name (including the package) to send the intent to, for example, "com.example.weather.WeatherOverviewActivity".

### setPackageName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull ActionBuilders.AndroidActivity.Builder setPackageName(@NonNull String packageName)
```

Sets the package name to send the intent to, for example, "com.example.weather".