Skip to content

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 PolarSessionBuilder API

Dart
try {
    LicenseDetails licenseDetails = LicenseDetails("<ENTER_YOUR_LICENSE_KEY>");
    String deviceId = "<ENTER_POLAR_DEVICE_ID>"
    Session? session = await PolarSessionBuilder(deviceId)
        .withVitalSignsListener(this)
        .withSessionInfoListener(this)
        .withPPGDeviceInfoListener(this)
        .build(licenseDetails);
} on HealthMonitorException catch(e) {
    print("Received Error. Domain: ${e.domain} Code: ${e.code}");
}

During session initialization, the SDK attempts to connect with the specified PPG Device using the provided device type and device ID. The session transitions to the ready state only when the connection is established. Session creation may fail for various reasons, such as disabled Bluetooth on the mobile device or an outdated PPG device firmware. For detailed error information, please consult the Alerts List.