ExerciseState

enum ExerciseState


Enumerates the state of an exercise.

Summary

Enum Values

ACTIVE

The exercise is actively in-progress.

AUTO_ENDED

The exercise has been automatically ended due to a lack of exercise updates being received by the user.

AUTO_ENDING

The exercise is being automatically ended due to a lack of exercise updates being received by the user.

AUTO_PAUSED

The session has been automatically paused.

AUTO_PAUSING

The session is being paused by auto-pause.

AUTO_RESUMING

The session is being automatically resumed.

TERMINATED

The exercise has been ended because it was superseded by a new exercise being started by another client.

TERMINATING

The exercise is being ended because it has been superseded by a new exercise being started by another client.

USER_ENDED

The exercise has been ended by the user.

USER_ENDING

The exercise is being ended by the user.

USER_PAUSED

The session has been paused by the user.

USER_PAUSING

The session is being paused by the user.

USER_RESUMING

The session is being resumed by the user.

USER_STARTING

The exercise is actively being started, but we don't yet have sensor stability or GPS fix.

Public fields

final int
final boolean

Returns true if this ExerciseState corresponds to one of the ended states and false otherwise.

final boolean

Returns true if this ExerciseState corresponds to one of the paused states and false otherwise.

final boolean

Returns true if this ExerciseState corresponds to one of the resuming states and false otherwise.

final @NonNull String
final int

Enum Values

ACTIVE

@NonNull
@NonNull ExerciseState ExerciseState.ACTIVE

The exercise is actively in-progress.

Used in both of the manually started exercise and the automatic exercise detection. It's also the state when the automatic exercise detection has detected an exercise and the exercise is actively in-progress.

AUTO_ENDED

@NonNull
@NonNull ExerciseState ExerciseState.AUTO_ENDED

The exercise has been automatically ended due to a lack of exercise updates being received by the user. No new metrics will be exported and a final summary should be provided to the client.

Used only in the manually started exercise.

AUTO_ENDING

@NonNull
@NonNull ExerciseState ExerciseState.AUTO_ENDING

The exercise is being automatically ended due to a lack of exercise updates being received by the user. Sensors are actively being flushed.

Used only in the manually started exercise.

AUTO_PAUSED

@NonNull
@NonNull ExerciseState ExerciseState.AUTO_PAUSED

The session has been automatically paused. Sensors have completed flushing.

Used only in the manually started exercise.

AUTO_PAUSING

@NonNull
@NonNull ExerciseState ExerciseState.AUTO_PAUSING

The session is being paused by auto-pause. Sensors are actively being flushed.

Used only in the manually started exercise.

AUTO_RESUMING

@NonNull
@NonNull ExerciseState ExerciseState.AUTO_RESUMING

The session is being automatically resumed.

Used only in the manually started exercise.

TERMINATED

@NonNull
@NonNull ExerciseState ExerciseState.TERMINATED

The exercise has been ended because it was superseded by a new exercise being started by another client. No new metrics will be exported and a final summary should be provided to the client.

Used in both of the manually started exercise and the automatic exercise detection.

TERMINATING

@NonNull
@NonNull ExerciseState ExerciseState.TERMINATING

The exercise is being ended because it has been superseded by a new exercise being started by another client. Sensors are actively being flushed.

Used in both of the manually started exercise and the automatic exercise detection.

USER_ENDED

@NonNull
@NonNull ExerciseState ExerciseState.USER_ENDED

The exercise has been ended by the user. No new metrics will be exported and a final summary should be provided to the client.

Used only in the manually started exercise.

USER_ENDING

@NonNull
@NonNull ExerciseState ExerciseState.USER_ENDING

The exercise is being ended by the user. Sensors are actively being flushed.

Used only in the manually started exercise.

USER_PAUSED

@NonNull
@NonNull ExerciseState ExerciseState.USER_PAUSED

The session has been paused by the user. Sensors have completed flushing.

Used only in the manually started exercise.

USER_PAUSING

@NonNull
@NonNull ExerciseState ExerciseState.USER_PAUSING

The session is being paused by the user. Sensors are actively being flushed.

Used only in the manually started exercise.

USER_RESUMING

@NonNull
@NonNull ExerciseState ExerciseState.USER_RESUMING

The session is being resumed by the user.

Used only in the manually started exercise.

USER_STARTING

@NonNull
@NonNull ExerciseState ExerciseState.USER_STARTING

The exercise is actively being started, but we don't yet have sensor stability or GPS fix.

Used only in the manually started exercise.

Public fields

id

@NonNull
public final int id

isEnded

@NonNull
public final boolean isEnded

Returns true if this ExerciseState corresponds to one of the ended states and false otherwise. This method returns false if the exercise has been paused, to check whether it is currently paused call isPaused.

isPaused

@NonNull
public final boolean isPaused

Returns true if this ExerciseState corresponds to one of the paused states and false otherwise. This method returns false if the exercise has ended, to check whether it has ended call isEnded.

isResuming

@NonNull
public final boolean isResuming

Returns true if this ExerciseState corresponds to one of the resuming states and false otherwise. This method returns false if the exercise has ended, to check whether it has ended call isEnded.

name

@NonNull
public final @NonNull String name

ordinal

@NonNull
public final int ordinal