# Interface WorkoutSessionListener

public interface WorkoutSessionListener
Receives workout lifecycle and statistics updates. All callbacks arrive on the EDT.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `workoutEvent(WorkoutSession session, WorkoutEvent event)`
  An event was recorded, whether by the app or detected by the platform.
  `void`
  `workoutFailed(WorkoutSession session, HealthException error)`
  The session failed and will not continue.
  `void`
  `workoutStateChanged(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.
  `void`
  `workoutStatisticsUpdated(WorkoutSession session, HealthDataType type)`
  A live statistic changed.

- ## Method Details

  - ### workoutStateChanged

    void workoutStateChanged(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.

  - ### workoutStatisticsUpdated

    void workoutStatisticsUpdated(WorkoutSession session, HealthDataType type)
    A live statistic changed. Read the new value with WorkoutSession#getStatistic(HealthDataType, com.codename1.health.AggregateMetric).

  - ### workoutEvent

    void workoutEvent(WorkoutSession session, WorkoutEvent event)
    An event was recorded, whether by the app or detected by the platform.

  - ### workoutFailed

    void workoutFailed(WorkoutSession session, HealthException error)
    The session failed and will not continue.