Class DocumentVerificationUISettings

    • Constructor Detail

      • DocumentVerificationUISettings

        public DocumentVerificationUISettings​(@NonNull
                                              android.content.Intent intent)
    • Method Detail

      • saveToIntent

        public void saveToIntent​(@NonNull
                                 android.content.Intent intent)
        Description copied from class: UISettings
        Saves this scan activity settings to Intent so it can be passed to the corresponding scan activity. Intent target activity must be set before calling this method, and target activity must be compatible with this settings. DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.
        Overrides:
        saveToIntent in class UISettings<DocumentVerificationOverlayController>
        Parameters:
        intent - Intent to which this scan activity settings should be saved.
      • getStyle

        @StyleRes
        protected int getStyle()
      • setOverlayViewStyle

        public void setOverlayViewStyle​(int styleResourceID)
        Provide your own style to replace default icons and colors. Supports attributes from R.styleable.DocumentVerificationReticleOverlay.
        Specified by:
        setOverlayViewStyle in interface StyleUIOptions
        Parameters:
        styleResourceID - your style
      • setBeepSoundResourceID

        public void setBeepSoundResourceID​(@RawRes
                                           int beepSoundResourceID)
        Description copied from interface: BeepSoundUIOptions
        Defines the resource ID of the sound to be played when recognition is successful.
        Specified by:
        setBeepSoundResourceID in interface BeepSoundUIOptions
        Parameters:
        beepSoundResourceID - resource ID of the sound to be played when recognition is successful.
      • setDebugImageListener

        public void setDebugImageListener​(@Nullable
                                          DebugImageListener debugImageListener)
        Description copied from interface: DebugImageListenerUIOptions
        Sets implementation of DebugImageListener interface that will obtain images that are being processed. DebugImageListener will receive all possible debug images that become available during recognition process.
        Specified by:
        setDebugImageListener in interface DebugImageListenerUIOptions
        Parameters:
        debugImageListener - Implementation of debug image listener or null to clear listener that has been set previously.
      • setDocumentDataMatchRequired

        public void setDocumentDataMatchRequired​(boolean isRequired)
        Description copied from interface: DocumentDataMatchUIOptions
        If set to true, user won't be able to finish the scanning process if data read from front and back sides doesn't match. This is applicable only when using combined recognizers.
        Specified by:
        setDocumentDataMatchRequired in interface DocumentDataMatchUIOptions
        Parameters:
        isRequired - true if you wish to enable document data matching
      • setShowFlashlightWarning

        public void setShowFlashlightWarning​(boolean showFlashlightWarning)
        Description copied from interface: FlashlightWarningUIOptions
        Defines whether flashlight warning will be displayed in UI, when flashlight is turned ON. Default is true.
        Specified by:
        setShowFlashlightWarning in interface FlashlightWarningUIOptions
        Parameters:
        showFlashlightWarning - whether flashlight warning will be displayed in UI.
      • getShowFlashlightWarning

        protected boolean getShowFlashlightWarning()
      • setShowMrzDetection

        public void setShowMrzDetection​(boolean showOcrResult)
        Description copied from interface: MrzDetectionUIOptions
        Defines whether detection of MRZ(Machine Readable Zone) will be displayed in UI, default is true.
        Specified by:
        setShowMrzDetection in interface MrzDetectionUIOptions
        Parameters:
        showOcrResult - whether detection of MRZ(Machine Readable Zone) will be displayed in UI.
      • setSplashScreenLayoutResourceID

        public void setSplashScreenLayoutResourceID​(int splashScreenLayoutResourceID)
        Description copied from interface: SplashScreenUIOptions
        Defines the ID of the layout resource that will be used as camera splash screen displayed while camera is being initialized. If not set, default splash screen will be used.
        Specified by:
        setSplashScreenLayoutResourceID in interface SplashScreenUIOptions
        Parameters:
        splashScreenLayoutResourceID - ID of the layout resource that will be used as camera splash screen displayed while camera is being initialized.
      • setShowHoldInHandDialog

        public void setShowHoldInHandDialog​(boolean showHoldInHandDialog)
        Defines whether camera overlay will show a dialog with instructions to hold the document in hand at the beginning of the scanning process. Default is true.
        Parameters:
        showHoldInHandDialog - whether "hold in hand" dialog will be displayed in UI.
      • setTiltStartTimeIntervalMs

        public void setTiltStartTimeIntervalMs​(long tiltStartTimeInterval)
        Sets time interval between neutral tilt step and first tilt step (left, right, top or down). By default, this is set to DocumentVerificationOverlaySettingsOptions.DEFAULT_TILT_START_TIME_INTERVAL_MS.
        Parameters:
        tiltStartTimeInterval - time interval between neutral tilt step and first tilt step.
      • setShowTooltipTimeIntervalMs

        public void setShowTooltipTimeIntervalMs​(long showTooltipTimeIntervalMs)
        Sets time interval between the start of the tilt step and displaying the help tooltip. Help tooltip is displayed only once. By default, this is set to DocumentVerificationOverlaySettingsOptions.DEFAULT_SHOW_TOOLTIP_TIME_INTERVAL_MS.
        Parameters:
        showTooltipTimeIntervalMs - time interval between the start of the tilt step and displaying the help tooltip.
      • setKeepScreenOn

        public void setKeepScreenOn​(boolean keepScreenOn)
        Defines whether system timeout will be disabled and screen kept always ON while scanning document. Default is false.
        Parameters:
        keepScreenOn - whether system timeout will be disabled and screen kept always ON.
      • shouldKeepScreenOn

        protected boolean shouldKeepScreenOn()
      • setDocumentTypeUi

        public void setDocumentTypeUi​(DocumentTypeUi documentTypeUi)
        Sets document type for the onboarding and info screen UI.
        Parameters:
        documentTypeUi - type of the document.
      • getTargetActivity

        @NonNull
        public java.lang.Class<?> getTargetActivity()
        Description copied from class: UISettings
        Returns target activity. Concrete settings can be used only with the corresponding activity. This method is public for convenience when you are not able to use ActivityRunner. DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.
        Specified by:
        getTargetActivity in class UISettings<DocumentVerificationOverlayController>
        Returns:
        target activity.