Appearance
PPG Device Session
Besides measurements using the camera, the SDK also supports Vital Sign measurements using PPG Devices. The current supported devices are:
- Polar (Polar Verity Sense model)
Creating a PPG Device session is done by using the SessionBuilder.polarSession
API
TypeScript
import {
SessionBuilder
} from 'binah-react-native-sdk';
try {
const session = await SessionBuilder.polarSession(
{licenseKey: "<ENTER_YOUR_LICENSE_KEY>"},
{deviceId: "<ENTER_POLAR_DEVICE_ID>"});
} catch (e) {
const exception = (e as HealthMonitorException)
console.log(`Error: ${exception?.code}`);
}
During the session's initialization, the SDK attempts to connect with the given PPG Device, based on the type of the device and the given device ID. The session only changes its state to the READY state if the connection was established. Session creation may fail due to various reasons. For instance, the mobile device's Bluetooth might be disabled, or the PPG device firmware version is too low. For more information on each error, please refer to the Alerts List.