ExerciseUpdateCallback
public interface ExerciseUpdateCallback
Callback that is called when the state of the current exercise is updated.
Summary
Public methods |
|
|---|---|
abstract void |
onAvailabilityChanged(Called during an |
default void |
Called when an |
abstract void |
Called during an ACTIVE exercise or on any changes in |
abstract void |
onLapSummaryReceived(@NonNull ExerciseLapSummary lapSummary)Called during an |
abstract void |
Called when this callback has been successfully registered with Health Services. |
abstract void |
onRegistrationFailed(@NonNull Throwable throwable)Called when Health Services reports a failure with the registration of this callback. |
Public methods
onAvailabilityChanged
abstract void onAvailabilityChanged(
@NonNull DataType<@NonNull ?, @NonNull ?> dataType,
@NonNull Availability availability
)
Called during an ExerciseState.ACTIVE exercise when the availability of a DataType changes.
| Parameters | |
|---|---|
@NonNull DataType<@NonNull ?, @NonNull ?> dataType |
the |
@NonNull Availability availability |
the new |
onExerciseEventReceived
default void onExerciseEventReceived(@NonNull ExerciseEvent event)
Called when an ExerciseEvent is emitted. May be called during any exercise state except for PREPARING or ENDED.
| Parameters | |
|---|---|
@NonNull ExerciseEvent event |
the latest |
onExerciseUpdateReceived
abstract void onExerciseUpdateReceived(@NonNull ExerciseUpdate update)
Called during an ACTIVE exercise or on any changes in ExerciseState.
| Parameters | |
|---|---|
@NonNull ExerciseUpdate update |
the |
onLapSummaryReceived
abstract void onLapSummaryReceived(@NonNull ExerciseLapSummary lapSummary)
Called during an ExerciseState.ACTIVE exercise once a lap has been marked.
| Parameters | |
|---|---|
@NonNull ExerciseLapSummary lapSummary |
an |
onRegistered
abstract void onRegistered()
Called when this callback has been successfully registered with Health Services.