Enum SensorSessionState

java.lang.Object
java.lang.Enum<SensorSessionState>
com.codename1.health.sensors.SensorSessionState
All Implemented Interfaces:
Comparable<SensorSessionState>

public enum SensorSessionState extends Enum<SensorSessionState>
The lifecycle of a SensorSession.
  • Enum Constant Details

    • CONNECTING

      public static final SensorSessionState CONNECTING
      Connecting and discovering services.
    • STREAMING

      public static final SensorSessionState STREAMING
      Connected and subscribed; measurements are arriving.
    • RECONNECTING

      public static final SensorSessionState RECONNECTING

      The link dropped and the session is trying to re-establish it. Reached only when SensorSessionOptions.setAutoReconnect(boolean) is on; the session recovers on its own and returns to STREAMING.

      Straps routinely drop out for a few seconds when a rider's chest moves the sensor, so treat this as a transient display state rather than an error.

    • STOPPED

      public static final SensorSessionState STOPPED
      The session was stopped by the app.
    • FAILED

      public static final SensorSessionState FAILED
      The session ended with an error and will not recover.
  • Method Details

    • values

      public static SensorSessionState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SensorSessionState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null