PassiveMonitoringConfig.Builder

public final class PassiveMonitoringConfig.Builder


Builder for PassiveMonitoringConfig instances.

Summary

Public constructors

Public methods

final @NonNull PassiveMonitoringConfig

Returns the built PassiveMonitoringConfig.

final @NonNull PassiveMonitoringConfig.Builder

Sets the ComponentName that WHS should send the PassiveMonitoringUpdate intents to.

final @NonNull PassiveMonitoringConfig.Builder

Sets the requested DataType s that should be passively tracked.

final @NonNull PassiveMonitoringConfig.Builder
setShouldIncludeUserActivityState(
    boolean shouldIncludeUserActivityState
)

Sets whether to include the UserActivityState with the PassiveMonitoringUpdates.

Public constructors

Builder

public final Builder()

Public methods

build

public final @NonNull PassiveMonitoringConfig build()

Returns the built PassiveMonitoringConfig.

setComponentName

public final @NonNull PassiveMonitoringConfig.Builder setComponentName(ComponentName componentName)

Sets the ComponentName that WHS should send the PassiveMonitoringUpdate intents to.

setDataTypes

public final @NonNull PassiveMonitoringConfig.Builder setDataTypes(Set<DataType> dataTypes)

Sets the requested DataType s that should be passively tracked. It is required to specify a set of DataTypes to create a valid configuration. Failure to do so will result in an exception thrown when build is called.

setShouldIncludeUserActivityState

public final @NonNull PassiveMonitoringConfig.Builder setShouldIncludeUserActivityState(
    boolean shouldIncludeUserActivityState
)

Sets whether to include the