ExerciseConfig.Builder

public final class ExerciseConfig.Builder


Builder for ExerciseConfig instances.

Summary

Public constructors

Public methods

final @NonNull ExerciseConfig

Returns the built ExerciseConfig.

final @NonNull ExerciseConfig.Builder

Sets the requested DataTypes that should be tracked as aggregates (i.e.

final @NonNull ExerciseConfig.Builder

Sets the requested DataType s that should be tracked during this exercise.

final @NonNull ExerciseConfig.Builder

Sets ExerciseGoal s specified for this exercise.

final @NonNull ExerciseConfig.Builder
setExerciseParams(Bundle exerciseParams)

Sets additional OEM specific parameters for the current exercise.

final @NonNull ExerciseConfig.Builder

Sets the active ExerciseType the user is performing for this exercise.

final @NonNull ExerciseConfig.Builder
setShouldEnableAutoPauseAndResume(
    boolean shouldEnableAutoPauseAndResume
)

Sets whether auto pause and auto resume should be enabled for this exercise.

final @NonNull ExerciseConfig.Builder
setShouldEnableGps(boolean shouldEnableGps)

Sets whether GPS will be used for this exercise.

Public constructors

Builder

public final Builder()

Public methods

build

public final @NonNull ExerciseConfig build()

Returns the built ExerciseConfig.

setAggregateDataTypes

public final @NonNull ExerciseConfig.Builder setAggregateDataTypes(Set<DataType> dataTypes)

Sets the requested DataTypes that should be tracked as aggregates (i.e. total steps or average heart rate) during this exercise. If not explicitly called, a default set of DataType will be chosen based on the ExerciseType.

setDataT