Skip to content
On this page

Subject Demographic Information

In order to provide highly accurate results, the SDK requires demographic information regarding the user who is taking the measurement. This information is not mandatory, but it improves the accuracy of the vital signs that are calculated by the system. The demographic information consists of three fields:

  • Sex (as classified at birth) [UNSPECIFIED / MALE / FEMALE]
  • Age [years]
  • Weight [Kilograms]

Note

Demographic information can be set only for face and PPG Device measurement sessions.

The application can provide the demographic information as part of the session initiation.

In the following example, the sex is female, the age is 35 years and the weight is 65 kilograms. In the example the measurement session is a face session, but it can be used in a PPG Device session as well.

Kotlin
try {
    val licenseDetails = LicenseDetails("<ENTER_YOUR_LICENSE_KEY>")
    val subjectDemographic = SubjectDemographic(Sex.FEMALE, 35, 65) 
    val session = FaceSessionBuilder(applicationContext) 
                    .withSubjectDemographic(subjectDemographic) 
                    .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>");
    SubjectDemographic subjectDemographic = new SubjectDemographic(Sex.FEMALE, 35.0, 65.0); 
    Session session = new FaceSessionBuilder(getApplicationContext())  
            .withSubjectDemographic(subjectDemographic) 
            .withImageListener(this)
            .withVitalSignsListener(this)
            .withSessionInfoListener(this)
            .build(licenseDetails);
} catch (HealthMonitorException e) {
    Log.i("ERROR", "Received Error. Domain: "+ e.getDomain() +" Code: "+ e.getErrorCode());
}

If any of the demographic parameters is unknown, it is recommended to provide the known parameters and to leave the others null/UNSPECIFIED.

Important

When a session is created with demographic information, all measurements performed during that session use the same demographic information. Therefore, a new session must be created in order to update the demographic information.