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 Identifiers | Description |
|---|---|
smart_capture_face_photo_captured | Feedback for when a photo is captured |
smart_capture_face_one_face_only | Feedback for when more than one face is present |
smart_capture_face_position_in_oval | Feedback for when no face is detected or no other feedback applies |
smart_capture_face_fill_oval | Feedback for when the face does not fill the oval (too small, not centered, etc.) |
smart_capture_face_face_camera_directly | Feedback for when face is angled away from camera |
smart_capture_face_move_back_and_fill_oval | Feedback for when face is too close to camera |
smart_capture_face_hold_still | Feedback for when the face is moving around |
| Miscellaneous Identifiers | Description |
|---|---|
smart_capture_face_camera_permission_request_text | Explanation for why the camera permission is needed and how to grant it |
smart_capture_face_ok | Positive button text/confirmation |
| Alt Text Identifiers | Description |
|---|---|
smart_capture_face_green_checkmark_alt_text | Alt/accessibility text describing a green checkmark |
smart_capture_face_triangle_alt_text | Alt/accessibility text describing an orange exclamation |