Skip to content
On this page

PPG Device Info ​

The application can receive info related to the PPG device by implementing PPGDeviceInfoListener, and then pass it to the session builder when creating a session. Upon successful initialization and connection with a PPG Device, the SDK sends a PPGDeviceInfo object containing the device type, ID, and version.

  • The info of the connected PPG Device.
Dart
@override
  void onPPGDeviceBatteryLevel(int level) {
    // Receive battery level changes
  }

  @override 
  void onPPGDeviceInfo(PPGDeviceInfo ppgDeviceInfo) {
    // ppgDeviceInfo.deviceType -       The PPGDeviceType
    // ppgDeviceInfo.deviceId -         The device's ID
    // ppgDeviceInfo.version -          The firmware version of the device
  }

The SDK also provides the initial battery level of the device upon connection, as well as any subsequent changes in the device's battery level while the session is active.

Dart
@override 
  void onPPGDeviceBatteryLevel(int level) {
    // Receive battery level changes
  }

  @override
  void onPPGDeviceInfo(PPGDeviceInfo ppgDeviceInfo) {
    // ppgDeviceInfo.deviceType -       The PPGDeviceType
    // ppgDeviceInfo.deviceId -         The device's ID
    // ppgDeviceInfo.version -          The firmware version of the device
  }