Skip to main content

Customization

FaceCameraSettings

FaceCameraSettings is an object that can be passed to the face camera in order to modify its behaviour. The settings object is created via the FaceCameraSettingsBuilder documented below and accessible via FaceCameraSettings.builder().

/**
* Factory for creating a [FaceCameraSettings] object.
*/
interface FaceCameraSettingsBuilder {
enum class MovementStrictness {
Strict,
Medium,
Permissive
}

/**
* Creates and returns a [FaceCameraSettings] object with the options specified.
*/
fun build(): FaceCameraSettings

/**
* Sets how strict the detection for face movement is. Stricter values may make capture
* take slightly longer and make capture more difficult in shaky environments, but are
* more likely to result in sharp images that will process correctly via the backend.
* Lower strictness makes capture easier, but may result in more blurry images that get
* rejected by the backend. For the vast majority of implementations we recommend not
* changing this from the default value of [MovementStrictness.Medium].
*/
fun setMovementStrictness(strictness: MovementStrictness): FaceCameraSettingsBuilder
}

Localization

Localization is supported following the standard way to localize in Android (exposing all strings via strings.xml). The following tables contain string identifiers and brief descriptions of what those strings correspond to on screen.

Feedback IdentifiersDescription
smart_capture_face_photo_capturedFeedback for when a photo is captured
smart_capture_face_one_face_onlyFeedback for when more than one face is present
smart_capture_face_position_in_ovalFeedback for when no face is detected or no other feedback applies
smart_capture_face_fill_ovalFeedback for when the face does not fill the oval (too small, not centered, etc.)
smart_capture_face_face_camera_directlyFeedback for when face is angled away from camera
smart_capture_face_move_back_and_fill_ovalFeedback for when face is too close to camera
smart_capture_face_hold_stillFeedback for when the face is moving around
Miscellaneous IdentifiersDescription
smart_capture_face_camera_permission_request_textExplanation for why the camera permission is needed and how to grant it
smart_capture_face_okPositive button text/confirmation
Alt Text IdentifiersDescription
smart_capture_face_green_checkmark_alt_textAlt/accessibility text describing a green checkmark
smart_capture_face_triangle_alt_textAlt/accessibility text describing an orange exclamation