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.BuildersetSelfieCameraFacing(CameraFacing selfieCameraFacing)Sets the direction that the camera faces during the selfie scan. VideoSelfie.BuildersetIdScanCameraFacing(CameraFacing idScanCameraFacing)Sets the direction that the camera faces during the ID scan. VideoSelfie.BuildersetIdFrontCameraFacing(CameraFacing idFrontCameraFacing)Sets the direction that the camera faces during the ID front scan. VideoSelfie.BuildersetIdBackCameraFacing(CameraFacing idBackCameraFacing)Sets the direction that the camera faces during the ID back scan. VideoSelfie.BuildersetDocumentScanCameraFacing(CameraFacing documentScanCameraFacing)Sets the direction that the camera faces during the Document (Proof of Address) back scan. VideoSelfie.BuildersetRandomQuestions(List<VideoSelfieLocalQuestion> randomQuestions)Sets the custom questions to be presented in random questions step. VideoSelfie.BuildersetRandomQuestionsCameraFacing(CameraFacing randomQuestionsCameraFacing)Sets the direction that the camera faces during the random questions scan. VideoSelfie.BuildersetConsent(String consentText)Sets the custom consent text. VideoSelfie.BuildersetVoiceConsentCameraFacing(CameraFacing voiceConsentCameraFacing)Sets the direction that the camera faces during the voice consent step. VideoSelfie.BuildersetAssistedOnboardingEnabled()Enables assisted onboarding (back-camera-only onboarding) Note: This method is not used in VideoSelfieV2. VideoSelfie.BuildersetLogo(@DrawableRes() int logoResId)Used to provide a custom logo to supported screens in the VideoSelfie module. VideoSelfiebuild()VideoSelfie.BuildersetShowTutorials(boolean showTutorials)Show tutorials how to perform video selfie before the actual scan. VideoSelfie.BuildersetWaitForTutorials(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.BuildersetMinVideoLengthRequired(boolean minVideoLengthRequired)By default, users are not allowed to submit a video selfie recording shorter than 30s. VideoSelfie.BuildersetSelfieMode(VideoSelfie.SelfieMode selfieMode)Sets the mode used in the VideoSelfie step that captures a Selfie. VideoSelfie.BuildersetLivenessEnabled(boolean isEnabled)Enables/disables the liveness check. VideoSelfie.BuildersetEyesClosedCheckEnabled(boolean eyesClosedCheckEnabled)Enables/disables the eyes closed check. VideoSelfie.BuildersetHeadCoverCheckEnabled(boolean headCoverCheckEnabled)Enables/disables head cover check. VideoSelfie.BuildersetLensesCheckEnabled(boolean lensesCheckEnabled)Enables/disables lenses check. VideoSelfie.BuildersetMaskCheckEnabled(boolean maskCheckEnabled)Specify true to enable face mask check detection during face capture. VideoSelfie.BuildersetBrightnessCheckEnabled(boolean brightnessCheckEnabled)Specify true to enable brightness check during face capture. VideoSelfie.BuildersetSelfieScanEnabled(boolean isEnabled)Enables/disables Selfie scan step. VideoSelfie.BuildersetIdScanEnabled(boolean isEnabled)Enables/disables ID scan step. VideoSelfie.BuildersetEnableBackShownAsFrontCheck(boolean enableBackShownAsFrontCheck)VideoSelfie.BuildersetEnableFrontShownAsBackCheck(boolean enableFrontShownAsBackCheck)VideoSelfie.BuildersetDocumentScanEnabled(boolean isEnabled)Enables/disables Document (Proof of Address) scan step. VideoSelfie.BuildersetRandomQuestionsEnabled(boolean isEnabled)Enables/disables random questions step where user is asked to answer a set of questions verbally. VideoSelfie.BuildersetRandomQuestionsCount(int count)Sets the number of random questions to be presented to the user. VideoSelfie.BuildersetVoiceConsentEnabled(boolean isEnabled)Enables/disables voice consent step where user needs to answer verbally. VideoSelfie.BuildersetVoiceConsentFaceRecognitionEnabled(boolean isEnabled)Enables/disables face recognition during the voice consent step. VideoSelfie.BuildersetMaxVideoLength(int maxVideoLength)Sets the maximum video length in seconds. VideoSelfie.BuildersetDisableAudio(boolean disableAudio)Enables/disables audio for the recording. VideoSelfie.BuildersetFrontIdComparisonEnabled(boolean isEnabled)Enables/disables front ID comparison. VideoSelfie.BuildersetFrontIdOcrComparisonEnabled(boolean isEnabled)Enables/disables front ID OCR comparison. VideoSelfie.BuildersetBackIdComparisonEnabled(boolean isEnabled)Enables/disables back ID comparison. VideoSelfie.BuildersetBackIdOcrComparisonEnabled(boolean isEnabled)Enables/disables back ID OCR comparison. VideoSelfie.BuildersetShowSelfieStepFirst(boolean enabled)Determines whether the ID scan or Selfie scan step will be shown first. -
-
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.- Returns:
Builder
-
setHeadCoverCheckEnabled
VideoSelfie.Builder setHeadCoverCheckEnabled(boolean headCoverCheckEnabled)
Enables/disables head cover check. Default value is disabled. If enabled, all frames where head cover is detected are filtered out and not used for further processing.
- Parameters:
headCoverCheckEnabled- Boolean to indicate if the head cover check should be performed.- 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.- 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.- 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. Make sure you have included `com.incode.sdk:model-face-recognition:x.y.z` dependency in the build.gradle, otherwise MissingModelFaceRecognitionDependencyException will be thrown.
- 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
disableAudiois set to true, Questions and Voice Consent steps will be skipped.- Returns:
Builder
-
setFrontIdComparisonEnabled
VideoSelfie.Builder setFrontIdComparisonEnabled(boolean isEnabled)
Enables/disables front ID comparison. Default value is true.
- Returns:
Builder
-
setFrontIdOcrComparisonEnabled
VideoSelfie.Builder setFrontIdOcrComparisonEnabled(boolean isEnabled)
Enables/disables front ID OCR comparison. Default value is true.
- Returns:
Builder
-
setBackIdComparisonEnabled
VideoSelfie.Builder setBackIdComparisonEnabled(boolean isEnabled)
Enables/disables back ID comparison. Default value is true.
- Returns:
Builder
-
setBackIdOcrComparisonEnabled
VideoSelfie.Builder setBackIdOcrComparisonEnabled(boolean isEnabled)
Enables/disables back ID OCR comparison. Default value is true.
- Returns:
Builder
-
setShowSelfieStepFirst
VideoSelfie.Builder setShowSelfieStepFirst(boolean enabled)
Determines whether the ID scan or Selfie scan step will be shown first. Default value is false.
- Parameters:
enabled- If true, Selfie scan step will show first, before the ID scan step.- Returns:
Builder
-
-
-
-