BridgingConfig.Builder


public final class BridgingConfig.Builder


Builder for BridgingConfig. The set of excluded tags is empty, unless added with addExcludedTag or addExcludedTags.

Summary

Public constructors

Builder(@NonNull Context context, boolean isBridgingEnabled)

Public methods

final @NonNull BridgingConfig.Builder

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

final @NonNull BridgingConfig.Builder

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

final @NonNull BridgingConfig

Builds a BridgingConfig object.

Public constructors

Builder

Added in 1.0.0
public Builder(@NonNull Context context, boolean isBridgingEnabled)
Parameters
@NonNull Context context

The Context 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
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
@NonNull String tag

The tag to exclude from the default bridging mode.

Returns
@NonNull BridgingConfig.Builder

The Builder instance.

addExcludedTags

Added in 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
@NonNull Collection<@NonNull String> tags

The collection of tags to exclude from the default bridging mode.

Returns
@NonNull BridgingConfig.Builder

The Builder instance.

build

Added in 1.0.0
public final @NonNull BridgingConfig build()

Builds a BridgingConfig object.