Skip to content
On this page

Measurement Modes

The SDK supports three measurements modes - face measurements, finger measurements and Polar measurements.

Face Measurement

A face measurement is performed by facing the front (selfie) camera.

Kotlin
try {
    val licenseDetails = LicenseDetails("<ENTER_YOUR_LICENSE_KEY>")
    val session = FaceSessionBuilder(applicationContext)
                    .withImageListener(this)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .build(licenseDetails)
} catch (e: HealthMonitorException) {
    Log.i("ERROR", "Received Error. Domain: ${e.domain} Code: ${e.errorCode}")
}
Java
try {
    LicenseDetails licenseDetails = new LicenseDetails("<ENTER_YOUR_LICENSE_KEY>");
    Session session = new FaceSessionBuilder(getApplicationContext())
                    .withImageListener(this)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .build(licenseDetails);
} catch (HealthMonitorException e) {
    Log.i("ERROR", "Received Error. Domain: "+ e.getDomain() +" Code: "+ e.getErrorCode());
}

Finger Measurement

Deprecation Warning

Finger measurements are deprecated and will be removed in future versions of Binah.ai's SDK.

A finger measurement is performed by covering the rear camera of a device with a finger.

Kotlin
try {
    val licenseDetails = LicenseDetails("<ENTER_YOUR_LICENSE_KEY>")
    val session = FingerSessionBuilder(applicationContext)
                    .withImageListener(this)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .build(licenseDetails);
} catch (e: HealthMonitorException) {
    Log.i("ERROR", "Received Error. Domain: ${e.domain} Code: ${e.errorCode}")
}
Java
try {
    LicenseDetails licenseDetails = new LicenseDetails("<ENTER_YOUR_LICENSE_KEY>")
    Session session = new FingerSessionBuilder(getApplicationContext())
                    .withImageListener(this)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .build(licenseDetails);
} catch (HealthMonitorException e) {
    Log.i("ERROR", "Received Error. Domain: "+ e.getDomain() +" Code: "+ e.getErrorCode());
}

Polar Measurement

A Polar measurement is conducted by connecting to the Polar Verity Sense sensor and wearing it on the forearm, following the instructions provided in the Polar Verity Sense User Manual.

Kotlin
try {
    val licenseDetails = LicenseDetails("<ENTER_YOUR_LICENSE_KEY>")
    val deviceID = "<ENTER_POLAR_DEVICE_ID>"
    val session = PolarSessionBuilder(applicationContext, deviceID)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .withPPGDeviceInfoListener(this)
                    .build(licenseDetails);
} catch (e: HealthMonitorException) {
    Log.i("ERROR", "Received Error. Domain: ${e.domain} Code: ${e.errorCode}")
}
Java
try {
    LicenseDetails licenseDetails = new LicenseDetails("<ENTER_YOUR_LICENSE_KEY>");
    String deviceID = "<ENTER_POLAR_DEVICE_ID>";
    Session session = new PolarSessionBuilder(getApplicationContext(), deviceID)
                    .withVitalSignsListener(this)
                    .withSessionInfoListener(this)
                    .withPPGDeviceInfoListener(this)
                    .build(licenseDetails);
} catch (HealthMonitorException e) {
    Log.i("ERROR", "Received Error. Domain: "+ e.getDomain() +" Code: "+ e.getErrorCode());
}

The Polar Device ID can either be retrieved by the PPG Device Scanner or found on the Polar device as shown in the image below: img