Enum SensorSessionState
- All Implemented Interfaces:
Comparable<SensorSessionState>
The lifecycle of a
SensorSession.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConnecting and discovering services.The session ended with an error and will not recover.The link dropped and the session is trying to re-establish it.The session was stopped by the app.Connected and subscribed; measurements are arriving. -
Method Summary
Modifier and TypeMethodDescriptionstatic SensorSessionStateReturns the enum constant of this type with the specified name.static SensorSessionState[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
CONNECTING
Connecting and discovering services. -
STREAMING
Connected and subscribed; measurements are arriving. -
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 toSTREAMING.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
The session was stopped by the app. -
FAILED
The session ended with an error and will not recover.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-