Class VideoSelfie.Builder
-
- All Implemented Interfaces:
public final class VideoSelfie.Builder
-
-
Constructor Summary
Constructors Constructor Description VideoSelfie.Builder()
-
Method Summary
Modifier and Type Method Description VideoSelfie.Builder
setSelfieCameraFacing(CameraFacing selfieCameraFacing)
Sets the direction that the camera faces during the selfie scan. VideoSelfie.Builder
setIdScanCameraFacing(CameraFacing idScanCameraFacing)
Sets the direction that the camera faces during the ID scan. VideoSelfie.Builder
setIdFrontCameraFacing(CameraFacing idFrontCameraFacing)
Sets the direction that the camera faces during the ID front scan. VideoSelfie.Builder
setIdBackCameraFacing(CameraFacing idBackCameraFacing)
Sets the direction that the camera faces during the ID back scan. VideoSelfie.Builder
setDocumentScanCameraFacing(CameraFacing documentScanCameraFacing)
Sets the direction that the camera faces during the Document (Proof of Address) back scan. VideoSelfie.Builder
setRandomQuestions(List<VideoSelfieLocalQuestion> randomQuestions)
Sets the custom questions to be presented in random questions step. VideoSelfie.Builder
setRandomQuestionsCameraFacing(CameraFacing randomQuestionsCameraFacing)
Sets the direction that the camera faces during the random questions scan. VideoSelfie.Builder
setConsent(String consentText)
Sets the custom consent text. VideoSelfie.Builder
setVoiceConsentCameraFacing(CameraFacing voiceConsentCameraFacing)
Sets the direction that the camera faces during the voice consent step. VideoSelfie.Builder
setAssistedOnboardingEnabled()
Enables assisted onboarding (back-camera-only onboarding) Note: This method is not used in VideoSelfieV2. VideoSelfie.Builder
setLogo(@DrawableRes() int logoResId)
Used to provide a custom logo to supported screens in the VideoSelfie module. VideoSelfie
build()
VideoSelfie.Builder
setShowTutorials(boolean showTutorials)
Show tutorials how to perform video selfie before the actual scan. VideoSelfie.Builder
setWaitForTutorials(boolean waitForTutorials)
Hide the continue button in the tutorial screen while tutorial animation is playing, in order to make sure user has seen the video before continuing. VideoSelfie.Builder
setMinVideoLengthRequired(boolean minVideoLengthRequired)
By default, users are not allowed to submit a video selfie recording shorter than 30s. VideoSelfie.Builder
setSelfieMode(VideoSelfie.SelfieMode selfieMode)
Sets the mode used in the VideoSelfie step that captures a Selfie. VideoSelfie.Builder
setLivenessEnabled(boolean isEnabled)
Enables/disables the liveness check. VideoSelfie.Builder
setEyesClosedCheckEnabled(boolean eyesClosedCheckEnabled)
Enables/disables the eyes closed check. VideoSelfie.Builder
setLensesCheckEnabled(boolean lensesCheckEnabled)
Enables/disables lenses check. VideoSelfie.Builder
setMaskCheckEnabled(boolean maskCheckEnabled)
Specify true to enable face mask check detection during face capture. VideoSelfie.Builder
setBrightnessCheckEnabled(boolean brightnessCheckEnabled)
Specify true to enable brightness check during face capture. VideoSelfie.Builder
setSelfieScanEnabled(boolean isEnabled)
Enables/disables Selfie scan step. VideoSelfie.Builder
setIdScanEnabled(boolean isEnabled)
Enables/disables ID scan step. VideoSelfie.Builder
setEnableBackShownAsFrontCheck(boolean enableBackShownAsFrontCheck)
VideoSelfie.Builder
setEnableFrontShownAsBackCheck(boolean enableFrontShownAsBackCheck)
VideoSelfie.Builder
setDocumentScanEnabled(boolean isEnabled)
Enables/disables Document (Proof of Address) scan step. VideoSelfie.Builder
setRandomQuestionsEnabled(boolean isEnabled)
Enables/disables random questions step where user is asked to answer a set of questions verbally. VideoSelfie.Builder
setRandomQuestionsCount(int count)
Sets the number of random questions to be presented to the user. VideoSelfie.Builder
setVoiceConsentEnabled(boolean isEnabled)
Enables/disables voice consent step where user needs to answer verbally. VideoSelfie.Builder
setVoiceConsentFaceRecognitionEnabled(boolean isEnabled)
Enables/disables face recognition during the voice consent step. VideoSelfie.Builder
setMaxVideoLength(int maxVideoLength)
Sets the maximum video length in seconds. VideoSelfie.Builder
setDisableAudio(boolean disableAudio)
Enables/disables audio for the recording. -
-
Method Detail
-
setSelfieCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setSelfieCameraFacing(CameraFacing selfieCameraFacing)
Sets the direction that the camera faces during the selfie scan. It can be FRONT or BACK. Default value is FRONT.
- Parameters:
selfieCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setIdScanCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setIdScanCameraFacing(CameraFacing idScanCameraFacing)
Sets the direction that the camera faces during the ID scan. It can be FRONT or BACK. Default value is BACK.
- Parameters:
idScanCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setIdFrontCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setIdFrontCameraFacing(CameraFacing idFrontCameraFacing)
Sets the direction that the camera faces during the ID front scan. It can be FRONT or BACK. Default value is BACK.
- Parameters:
idFrontCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setIdBackCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setIdBackCameraFacing(CameraFacing idBackCameraFacing)
Sets the direction that the camera faces during the ID back scan. It can be FRONT or BACK. Default value is BACK.
- Parameters:
idBackCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setDocumentScanCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setDocumentScanCameraFacing(CameraFacing documentScanCameraFacing)
Sets the direction that the camera faces during the Document (Proof of Address) back scan. It can be FRONT or BACK. Default value is BACK.
- Parameters:
documentScanCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setRandomQuestions
VideoSelfie.Builder setRandomQuestions(List<VideoSelfieLocalQuestion> randomQuestions)
Sets the custom questions to be presented in random questions step. Used for the CAPTURE_ONLY mode.
- Parameters:
randomQuestions
- a list of actual questions and expected answers.- Returns:
Builder
-
setRandomQuestionsCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setRandomQuestionsCameraFacing(CameraFacing randomQuestionsCameraFacing)
Sets the direction that the camera faces during the random questions scan. It can be FRONT or BACK. Default value is BACK.
- Parameters:
randomQuestionsCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setConsent
VideoSelfie.Builder setConsent(String consentText)
Sets the custom consent text. Used for the CAPTURE_ONLY mode.
-
setVoiceConsentCameraFacing
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setVoiceConsentCameraFacing(CameraFacing voiceConsentCameraFacing)
Sets the direction that the camera faces during the voice consent step. It can be FRONT or BACK. Default value is BACK.
- Parameters:
voiceConsentCameraFacing
- direction that the camera faces.- Returns:
Builder
-
setAssistedOnboardingEnabled
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setAssistedOnboardingEnabled()
Enables assisted onboarding (back-camera-only onboarding) Note: This method is not used in VideoSelfieV2.
-
setLogo
VideoSelfie.Builder setLogo(@DrawableRes() int logoResId)
Used to provide a custom logo to supported screens in the VideoSelfie module.
- Parameters:
logoResId
- The resource ID for the Drawable of the desired custom logo.- Returns:
Builder
-
build
VideoSelfie build()
-
setShowTutorials
VideoSelfie.Builder setShowTutorials(boolean showTutorials)
Show tutorials how to perform video selfie before the actual scan.
- Parameters:
showTutorials
- true to enable tutorials.- Returns:
Builder
-
setWaitForTutorials
VideoSelfie.Builder setWaitForTutorials(boolean waitForTutorials)
Hide the continue button in the tutorial screen while tutorial animation is playing, in order to make sure user has seen the video before continuing.
- Parameters:
waitForTutorials
- true to wait for tutorials to finish.- Returns:
Builder
-
setMinVideoLengthRequired
VideoSelfie.Builder setMinVideoLengthRequired(boolean minVideoLengthRequired)
By default, users are not allowed to submit a video selfie recording shorter than 30s. Set minVideoLengthRequired to false to allow shorter video submissions.
- Parameters:
minVideoLengthRequired
- true to enforce a minimum video length.- Returns:
Builder
-
setSelfieMode
VideoSelfie.Builder setSelfieMode(VideoSelfie.SelfieMode selfieMode)
Sets the mode used in the VideoSelfie step that captures a Selfie.
- Parameters:
selfieMode
- SELFIE_MATCH or FACE_MATCHSELFIE_MATCH Does comparison between previously captured selfie and a new selfie.- Returns:
Builder
-
setLivenessEnabled
VideoSelfie.Builder setLivenessEnabled(boolean isEnabled)
Enables/disables the liveness check.
- Parameters:
isEnabled
- true to enable the liveness check.- Returns:
Builder
-
setEyesClosedCheckEnabled
VideoSelfie.Builder setEyesClosedCheckEnabled(boolean eyesClosedCheckEnabled)
Enables/disables the eyes closed check. Default value is enabled. If enabled, all frames where closed eyes are detected are filtered out and not used for further processing.
- Parameters:
eyesClosedCheckEnabled
- Boolean to indicate if the eyes closed check should be performed locally.- Returns:
Builder
-
setLensesCheckEnabled
VideoSelfie.Builder setLensesCheckEnabled(boolean lensesCheckEnabled)
Enables/disables lenses check. Default value is enabled. If enabled, all frames where lenses are detected are filtered out and not used for further processing.
- Parameters:
lensesCheckEnabled
- Boolean to indicate if the lenses check should be performed locally.- Returns:
Builder
-
setMaskCheckEnabled
VideoSelfie.Builder setMaskCheckEnabled(boolean maskCheckEnabled)
Specify true to enable face mask check detection during face capture. Default value is false. Face Mask Check is performed on the server, unless local mask detection dependency is included in module-level `app/build.gradle`.
- Parameters:
maskCheckEnabled
- Boolean to indicate if the mask check should be performed locally.- Returns:
Builder
-
setBrightnessCheckEnabled
VideoSelfie.Builder setBrightnessCheckEnabled(boolean brightnessCheckEnabled)
Specify true to enable brightness check during face capture. Default value is false. Brightness Check is performed on the server, unless local brightness check dependency is included in module-level `app/build.gradle`.
- Parameters:
brightnessCheckEnabled
- Set to true to enable brightness check, false otherwise.- Returns:
Builder Returns the updated Builder object with the brightness check configuration.
-
setSelfieScanEnabled
VideoSelfie.Builder setSelfieScanEnabled(boolean isEnabled)
Enables/disables Selfie scan step. Default value is true.
- Parameters:
isEnabled
- Set to true to enable, false to disable.- Returns:
Builder
-
setIdScanEnabled
VideoSelfie.Builder setIdScanEnabled(boolean isEnabled)
Enables/disables ID scan step. ID is checked against the details read from the previously provided ID to make sure user is showing the same document. Default value is false.
- Returns:
Builder
-
setEnableBackShownAsFrontCheck
VideoSelfie.Builder setEnableBackShownAsFrontCheck(boolean enableBackShownAsFrontCheck)
-
setEnableFrontShownAsBackCheck
VideoSelfie.Builder setEnableFrontShownAsBackCheck(boolean enableFrontShownAsBackCheck)
-
setDocumentScanEnabled
@Deprecated(message = "This method is deprecated and will be removed in a future version.") VideoSelfie.Builder setDocumentScanEnabled(boolean isEnabled)
Enables/disables Document (Proof of Address) scan step. Default value is false.
- Returns:
Builder
-
setRandomQuestionsEnabled
VideoSelfie.Builder setRandomQuestionsEnabled(boolean isEnabled)
Enables/disables random questions step where user is asked to answer a set of questions verbally. Default value is false.
- Returns:
Builder
-
setRandomQuestionsCount
VideoSelfie.Builder setRandomQuestionsCount(int count)
Sets the number of random questions to be presented to the user. Default value is 3. Used only in STANDARD mode. For CAPTURE_ONLY mode, use setRandomQuestions.
- Parameters:
count
- number of questions to be shown.- Returns:
Builder
-
setVoiceConsentEnabled
VideoSelfie.Builder setVoiceConsentEnabled(boolean isEnabled)
Enables/disables voice consent step where user needs to answer verbally. Text to speech technology is used to evaluate the answer. Default value is false.
- Returns:
Builder
-
setVoiceConsentFaceRecognitionEnabled
VideoSelfie.Builder setVoiceConsentFaceRecognitionEnabled(boolean isEnabled)
Enables/disables face recognition during the voice consent step. Default value is false.
- Returns:
Builder
-
setMaxVideoLength
VideoSelfie.Builder setMaxVideoLength(int maxVideoLength)
Sets the maximum video length in seconds. Default value is 300 seconds.
- Returns:
Builder
-
setDisableAudio
VideoSelfie.Builder setDisableAudio(boolean disableAudio)
Enables/disables audio for the recording. Default value is false. Set to true when audio is not needed, to reduce the number of required permissions. Note: When
disableAudio
is set to true, Questions and Voice Consent steps will be skipped.- Returns:
Builder
-
-
-
-