# BridgingConfig.Builder

Artifact: [androidx.wear:wear-phone-interactions](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/phone/interactions/notifications/BridgingConfig.kt+class:androidx.wear.phone.interactions.notifications.BridgingConfig.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

*** ** * ** ***


```
public final class BridgingConfig.Builder
```

<br />

*** ** * ** ***

Builder for BridgingConfig. The set of excluded tags is empty, unless added with `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#addExcludedTag(kotlin.String)` or `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#addExcludedTags(kotlin.collections.Collection)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#Builder(android.content.Context,kotlin.Boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, boolean isBridgingEnabled)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder` | `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#addExcludedTag(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html tag)` Adds a tag for which the bridging mode is the opposite as the default mode. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder` | `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#addExcludedTags(kotlin.collections.Collection)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> tags)` Sets a collection of tags for which the bridging mode is the opposite as the default mode. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig` | `https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder#build()()` Builds a BridgingConfig object. |

## Public constructors

### Builder

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

```
public Builder(@NonNull Context context, boolean isBridgingEnabled)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The `https://developer.android.com/reference/android/content/Context.html` of the application requesting a BridgingConfig change. |
| `boolean isBridgingEnabled` | Whether notification bridging is enabled in the configuration. |

## Public methods

### addExcludedTag

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

```
public final @NonNull BridgingConfig.Builder addExcludedTag(@NonNull String tag)
```

Adds a tag for which the bridging mode is the opposite as the default mode.

Examples:

```
new BridgingConfig.Builder(context, false)  // bridging disabled by default
  .addExcludedTag("foo")
  .addExcludedTag("bar")
  .build());
```

```
new BridgingConfig.Builder(context, true)  // bridging enabled by default
  .addExcludedTag("foo")
  .addExcludedTag("bar")
  .build());
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html tag` | The tag to exclude from the default bridging mode. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder` | The Builder instance. |

### addExcludedTags

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

```
public final @NonNull BridgingConfig.Builder addExcludedTags(@NonNull Collection<@NonNull String> tags)
```

Sets a collection of tags for which the bridging mode is the opposite as the default mode.

Examples:

```
new BridgingConfig.Builder(context, false)  // bridging disabled by default
  .addExcludedTags(Arrays.asList("foo", "bar", "baz"))
  .build());
```

```
new BridgingConfig.Builder(context, true)  // bridging enabled by default
  .addExcludedTags(Arrays.asList("foo", "bar", "baz"))
  .build());
}
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> tags` | The collection of tags to exclude from the default bridging mode. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/notifications/BridgingConfig.Builder` | The Builder instance. |

### build

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

```
public final @NonNull BridgingConfig build()
```

Builds a BridgingConfig object.