⚡Events
During a measurement, the SDK emits events to inform the application of the progress of the PPG measurement. Events will only be emitted after a measurement is started using the startMeasurement
SDK Method.
Subscribe to events
The following code examples demonstrate how to listen for events on each platform. The examples feature the onFingerDetected
events. Subscribing to other events is similar.
Available events
onFingerDetected
onFingerRemoved
onFingerDetectionTimeExpired
onPulseDetected
onPulseDetectionTimeExpired
onCalibrationReady
onMeasurementStart
onHeartBeat
onSampleReady
When acting on this event it's important to measure the performance of the application while measuring. Especially in cross-platform environments (Flutter, React Native, Cordova) it's possible that the bridging layer is not fast enough to handle the amount of data that this event generates.
The range of PPG values reported by this event can vary greatly between different devices and depends on ambient lightning conditions. If you want to plot the PPG values, keep these recommendations:
Only plot the latest x samples
Use dynamic ranges for the y-axis of the visualization to account for differences in device specifications and conditions.
onMovementDetected
onTimeRemaining
onMeasurementFinished
onMeasurementError
onMeasurementProcessed
Last updated