ExerciseCapabilities


public final class ExerciseCapabilities


Contains the capabilities supported by androidx.health.services.client.ExerciseClient on this device.

Summary

Public constructors

ExerciseCapabilities(
    @NonNull Map<@NonNull ExerciseType, @NonNull ExerciseTypeCapabilities> typeToCapabilities,
    @NonNull Set<@NonNull BatchingMode> supportedBatchingModeOverrides
)

Public methods

final @NonNull Set<@NonNull ExerciseType>

Returns the set of ExerciseTypes that support auto pause and resume on this device.

final @NonNull ExerciseTypeCapabilities

Returns the supported ExerciseTypeCapabilities for a requested ExerciseType.

final @NonNull Set<@NonNull BatchingMode>

Supported BatchingMode overrides on this device.

final @NonNull Set<@NonNull ExerciseType>

Set of supported ExerciseType s on this device.

final @NonNull Map<@NonNull ExerciseType, @NonNull ExerciseTypeCapabilities>

Mapping for each supported ExerciseType to its ExerciseTypeCapabilities on this device.

@NonNull String

Public constructors

ExerciseCapabilities

Added in 1.0.0
public ExerciseCapabilities(
    @NonNull Map<@NonNull ExerciseType, @NonNull ExerciseTypeCapabilities> typeToCapabilities
)

ExerciseCapabilities

Added in 1.0.0
public ExerciseCapabilities(
    @NonNull Map<@NonNull ExerciseType, @NonNull ExerciseTypeCapabilities> typeToCapabilities,
    @NonNull Set<@NonNull BatchingMode> supportedBatchingModeOverrides
)

Public methods

getAutoPauseAndResumeEnabledExercises

Added in 1.0.0
public final @NonNull Set<@NonNull ExerciseTypegetAutoPauseAndResumeEnabledExercises()

Returns the set of ExerciseTypes that support auto pause and resume on this device.

getExerciseTypeCapabilities

Added in 1.0.0
public final @NonNull ExerciseTypeCapabilities getExerciseTypeCapabilities(@NonNull ExerciseType exercise)

Returns the supported ExerciseTypeCapabilities for a requested ExerciseType.

Throws
kotlin.IllegalArgumentException

if the exercise is not supported

getSupportedBatchingModeOverrides

Added in 1.0.0
public final @NonNull Set<@NonNull BatchingModegetSupportedBatchingModeOverrides()

Supported BatchingMode overrides on this device.

getSupportedExerciseTypes

Added in 1.0.0
public final @NonNull Set<@NonNull ExerciseTypegetSupportedExerciseTypes()

Set of supported ExerciseType s on this device.

getTypeToCapabilities

Added in 1.0.0
public final @NonNull Map<@NonNull ExerciseType, @NonNull ExerciseTypeCapabilitiesgetTypeToCapabilities()

Mapping for each supported ExerciseType to its ExerciseTypeCapabilities on this device.

toString

public @NonNull String toString()