By press on the Capture button the user will be led to the capture screen. Photo will be made automatically as soon as face fits frame and recognize
faceCaptureStep {
title = "Take a selfie"
instruction = "We need to make sure the document belongs to you"
image = R.drawable.img_selfie_intro
criteriaList = criteriaList
btnCapture = "Take a selfie"
nextStep = nextStep
}
title - title field (optional)
instruction - instruction text (optional)
image - image (optional)
criteriaList - list of criteria that you may ask an user to check before continue (optional)
btnCapture - text on the Capture button (optional)
nextStep - next step (optional)
val criteriaList = listOf(
FaceCriteriaModel(
icon = R.drawable.ic_doc_confirm_criteria_1,
text = "Everything is clear"
),
FaceCriteriaModel(
icon = R.drawable.ic_confirm_criteria_5,
text = "Face is not covered with hair"
),
FaceCriteriaModel(
icon = R.drawable.ic_confirm_criteria_9,
text = "You are not wearing a glasses"
)
)
icon - criteria icon (required, might be 0, if you want to skip)
text - criteria text (required)
Liveness step
Allows to make capture of user face and check if the user was real
livenessStep {
titleSuccess = "Successful Verification"
imageSuccess = R.drawable.img_lifeness_success
btnProceed = "Next"
titleFail = "We couldn't recognize your face"
textFail = "Make sure there is enough light and nothing is blocking your face: hat, headphones, mask, glasses etc."
imageFail = R.drawable.img_liveness_fail
btnRetry = "Retake a photo"
attempts = 2
isRequired = false
nextStep = nextStep
}
titleSuccess - title in successful case scenario (optional)
imageSuccess - image in successful case scenario (optional)
btnProceed - text on the Proceed button (optional)
titleFail - title in fail case scenario (optional)
textFail - text in fail case scenario (optional)
imageFail- image in fail case scenario (optional)
btnRetry - text on the Retry button (optional)
attempts - number of attempts before skip or terminate flow
isRequired - defines if flow should terminate true or skip step false when attempts are over
nextStep - next step (optional)
Matching step
Use this step to capture of user face and match it with the last portrait obtained on one of the previous step
matchingStep {
titleSuccess = "Successful Verification"
imageSuccess = R.drawable.img_matching_success
btnProceed = "Next"
titleFail = "We couldn't recognize your face"
textFail = "Make sure there is enough light and nothing is blocking your face: hat, headphones, mask, glasses etc."
imageFail = R.drawable.img_matching_fail
btnRetry = "Retake a photo"
attempts = 2
isRequired = false
nextStep = nextStep
}
titleSuccess - title in successful case scenario (optional)
imageSuccess - image in successful case scenario (optional)
btnProceed - text on the Proceed button (optional)
titleFail - title in fail case scenario (optional)
textFail - text in fail case scenario (optional)
imageFail- image in fail case scenario (optional)
btnRetry - text on the Retry button (optional)
attempts - number of attempts before skip or terminate flow
isRequired - defines if flow should terminate true or skip step false when attempts are over
nextStep - next step (optional)
Face capture styling
To override hint texts on the face scanning and retry screens just add corresponding localized strings in your strings.xml file:
<string name="reader.hint.fit">Fit your face in the oval</string>
<string name="reader.hint.lookStraight">Look straight</string>
<string name="reader.hint.moveAway">Move away</string>
<string name="reader.hint.moveCloser">Move closer</string>
<string name="reader.hint.stayStill">Hold steady</string>
<string name="reader.livenessProcessing.title.processing">Processing...</string>
<string name="reader.livenessRetry.action.retry">Retry</string>
<string name="reader.livenessRetry.text.guidelines">But please follow these guidelines:</string>
<string name="reader.livenessRetry.text.noGlare">No glare or extreme lighting</string>
<string name="reader.livenessRetry.text.noSmiling">Neutral expression, no smiling</string>
<string name="reader.livenessRetry.title.tryAgain">Let’s try that again</string>
<string name="reader.noCameraPermission.title.unavailable">Camera unavailable</string>
<string name="reader.strPrepareCamera">Preparing the camera...</string>
To change color scheme of the retry screen you may define your colors in the colors.xml