Interface SensorSampleListener
public interface SensorSampleListener
Receives measurements and state changes from a
SensorSession. All
callbacks arrive on the EDT.-
Method Summary
Modifier and TypeMethodDescriptionvoidsensorError(SensorSession session, HealthException error) An error occurred.voidsensorSample(SensorSession session, HealthSample sample) A new measurement arrived, already decoded into a health sample in its canonical unit.voidsensorStateChanged(SensorSession session, SensorSessionState state) The session changed state.
-
Method Details
-
sensorSample
A new measurement arrived, already decoded into a health sample in its canonical unit.
A single notification can produce more than one sample -- a cycling power meter reports power and cadence together -- so this is called once per sample, not once per notification.
-
sensorStateChanged
The session changed state. -
sensorError
An error occurred. The session may still recover if its state isSensorSessionState.RECONNECTING.
-