Appearance
Measurement Modes
The SDK supports two measurements modes - face measurements and finger 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 licenseKey = LicenseKey("<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 {
LicenseKey licenseKey = new LicenseKey("<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());
}