Interface WorkoutSessionListener
public interface WorkoutSessionListener
Receives workout lifecycle and statistics updates. All callbacks arrive
on the EDT.
-
Method Summary
Modifier and TypeMethodDescriptionvoidworkoutEvent(WorkoutSession session, WorkoutEvent event) An event was recorded, whether by the app or detected by the platform.voidworkoutFailed(WorkoutSession session, HealthException error) The session failed and will not continue.voidworkoutStateChanged(WorkoutSession session, WorkoutSessionState state) The session moved to a new state, including transitions the app did not request -- watchOS ends a session when the wearer starts another workout.voidworkoutStatisticsUpdated(WorkoutSession session, HealthDataType type) A live statistic changed.
-
Method Details
-
workoutStateChanged
The session moved to a new state, including transitions the app did not request -- watchOS ends a session when the wearer starts another workout. -
workoutStatisticsUpdated
A live statistic changed. Read the new value with WorkoutSession#getStatistic(HealthDataType, com.codename1.health.AggregateMetric). -
workoutEvent
An event was recorded, whether by the app or detected by the platform. -
workoutFailed
The session failed and will not continue.
-