Class BlinkCardUISettings

java.lang.Object
com.microblink.blinkcard.uisettings.UISettings<BlinkCardOverlayController>
com.microblink.blinkcard.uisettings.BlinkCardUISettings
All Implemented Interfaces:
BeepSoundUIOptions, CurrentImageListenerUIOptions, DebugImageListenerUIOptions, HighResSuccessFrameCaptureUIOptions, OcrResultDisplayUIOptions, SplashScreenUIOptions, StringsUIOptions<BlinkCardReticleOverlayStrings>, StyleUIOptions

  • Constructor Details

    • BlinkCardUISettings

      public BlinkCardUISettings(@Nullable RecognizerBundle recognizerBundle)
    • BlinkCardUISettings

      public BlinkCardUISettings(@NonNull android.content.Intent intent)
  • Method Details

    • getRecognizerBundle

      @NonNull public RecognizerBundle getRecognizerBundle()
      Returns the RecognizerBundle containing recognizers that will be used for processing.
      Returns:
      the RecognizerBundle containing recognizers that will be used for processing.
    • setOverlayViewStyle

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

      public void setStrings(@NonNull BlinkCardReticleOverlayStrings strings)
      Sets strings that will be used in the UI.
      Specified by:
      setStrings in interface StringsUIOptions<BlinkCardReticleOverlayStrings>
      Parameters:
      strings - strings that will be used
    • 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.
    • setCurrentImageListener

      public void setCurrentImageListener(@Nullable CurrentImageListener currentImageListener)
      Description copied from interface: CurrentImageListenerUIOptions
      Sets implementation of CurrentImageListener interface that will obtain images that are currently being processed. CurrentImageListener will receive all possible images that become available during recognition process.
      Specified by:
      setCurrentImageListener in interface CurrentImageListenerUIOptions
      Parameters:
      currentImageListener - Implementation of image listener or null to clear listener that has been set previously.
    • enableHighResSuccessFrameCapture

      public void enableHighResSuccessFrameCapture(boolean enabled)
      Description copied from interface: HighResSuccessFrameCaptureUIOptions
      Sets whether to enable capturing high res frames on recognition success. Default is false.
      Specified by:
      enableHighResSuccessFrameCapture in interface HighResSuccessFrameCaptureUIOptions
      Parameters:
      enabled - true if you wish to enable high res success frame capture
    • 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.
    • setOcrResultDisplayMode

      public void setOcrResultDisplayMode(@Nullable OcrResultDisplayMode ocrResultDisplayMode)
      Description copied from interface: OcrResultDisplayUIOptions
      Defines mode in which OCR result will be drawn on camera preview.
      Specified by:
      setOcrResultDisplayMode in interface OcrResultDisplayUIOptions
      Parameters:
      ocrResultDisplayMode - mode in which OCR result will be drawn on camera preview.
    • setEditScreenEnabled

      public void setEditScreenEnabled(boolean enabled)
      If set to true, additional screen that allows user to edit scan results will be show after scanning.
    • isEditScreenEnabled

      public boolean isEditScreenEnabled()
      Returns whether edit scan results screen will be shown after scanning.
      Returns:
      true if edit screen is enabled
    • setEditScreenTheme

      public void setEditScreenTheme(@StyleRes int editScreenResourceID)
      Provide your own theme to style edit screen. Either extend @style/MB_theme_blink_card_edit_screen or extend any AppCompat theme. If you don't extend our theme, make sure to provide all attributes from R.styleable.BlinkCardEditScreen.
      Parameters:
      editScreenResourceID - your theme
    • getEditScreenTheme

      @StyleRes public int getEditScreenTheme()
    • setEditScreenFieldConfiguration

      public void setEditScreenFieldConfiguration(BlinkCardEditFieldConfiguration fieldConfiguration)
      Configures which fields are available on edit scan results screen.
      Parameters:
      fieldConfiguration - your configuration
    • getEditScreenFieldConfiguration

      public BlinkCardEditFieldConfiguration getEditScreenFieldConfiguration()
    • setEditScreenStrings

      public void setEditScreenStrings(BlinkCardEditStrings strings)
      Sets strings that will be used in edit scan results screen.
      Parameters:
      strings - your custom strings
    • getEditScreenStrings

      public BlinkCardEditStrings getEditScreenStrings(android.content.Context context)
    • setShowGlareWarning

      public void setShowGlareWarning(boolean showFlashlightWarning)
      Defines whether glare warning will be displayed in UI, when flashlight is turned ON. Default is true.
      Parameters:
      showFlashlightWarning - whether glare warning will be displayed in UI.
    • setShowOnboardingInfo

      public void setShowOnboardingInfo(boolean showOnboardingInfo)
    • setShowIntroductionDialog

      public void setShowIntroductionDialog(boolean showIntroductionDialog)
    • setBackSideScanningTimeoutMs

      public void setBackSideScanningTimeoutMs(long backSideScanningTimeoutMs)
    • setShowTooltipTimeIntervalMs

      public void setShowTooltipTimeIntervalMs(long showTooltipTimeIntervalMs)
    • getShowTooltipTimeIntervalMs

      public long getShowTooltipTimeIntervalMs()
    • isLockedToPortrait

      protected boolean isLockedToPortrait()
    • getTargetActivity

      @NonNull public 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<BlinkCardOverlayController>
      Returns:
      target activity.
    • saveToIntent

      @CallSuper 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<BlinkCardOverlayController>
      Parameters:
      intent - Intent to which this scan activity settings should be saved.
    • createOverlayController

      @NonNull public BlinkCardOverlayController createOverlayController(@NonNull android.app.Activity activity, @NonNull ScanResultListener scanResultListener)
      Description copied from class: UISettings
      Creates overlay controller and configures it using set values.
      Specified by:
      createOverlayController in class UISettings<BlinkCardOverlayController>