Package com.microblink.blinkid.uisettings

# Class UISettings<ScanOverlayType extends ScanningOverlay>

java.lang.Object
com.microblink.blinkid.uisettings.UISettings<ScanOverlayType>

Direct Known Subclasses:
  `BaseBlinkIdUiSettings`

public abstract class UISettings<ScanOverlayType extends ScanningOverlay> extends Object
Base class for all concrete scan activity settings classes. Activity settings are used to configure available scanning options for the scan activity. All provided activities have their corresponding scan settings classes.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UISettings()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract ScanOverlayType`
  `createOverlayController(android.app.Activity activity, ScanResultListener scanResultListener)`
  Creates overlay controller and configures it using set values.
  `final int`
  `getActivityTheme()`
  `final boolean`
  `getFilterTouchesWhenObscured()`
  `abstract Class<?>`
  `getTargetActivity()`
  Returns target activity.
  `final boolean`
  `getUsingFlagSecure()`
  `void`
  `saveToIntent(android.content.Intent intent)`
  Saves this scan activity settings to `Intent` so it can be passed to the corresponding scan activity.
  `final void`
  `setActivityTheme(int themeId)`
  Sets theme that will be used by activity launched from these UiSettings.
  `final void`
  `setCameraSettings(CameraSettings cameraSettings)`
  Sets camera settings that will be used for scanning
  `final void`
  `setFilterTouchesWhenObscured(boolean filterTouchesWhenObscured)`
  Defines whether the framework should discard touches when the activity's window is obscured by another visible window.
  `final void`
  `setUsingFlagSecure(boolean usingFlagSecure)`
  Defines whether FLAG_SECURE on activity window, which indicates that the display has a secure video output and supports compositing secure surfaces, should be used.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UISettings

    public UISettings()

- ## Method Details

  - ### getUsingFlagSecure

    public final boolean getUsingFlagSecure()

  - ### setUsingFlagSecure

    public final void setUsingFlagSecure(boolean usingFlagSecure)
    Defines whether FLAG_SECURE on activity window, which indicates that the display has a secure video output and supports compositing secure surfaces, should be used. Default is `false`. Use this to prevent taking screenshots of the activity window content and to prevent content from being viewed on non-secure displays
    Parameters:
      `usingFlagSecure` - `true` to request using of FLAG_SECURE, `false` otherwise.

  - ### getFilterTouchesWhenObscured

    public final boolean getFilterTouchesWhenObscured()

  - ### setFilterTouchesWhenObscured

    public final void setFilterTouchesWhenObscured(boolean filterTouchesWhenObscured)
    Defines whether the framework should discard touches when the activity's window is obscured by another visible window. Default is `false`. Use this to prevent malicious attacks where user could be tricked into tapping on something different from what the user perceives. This is commonly known as tapjacking.
    Parameters:
      `filterTouchesWhenObscured` - `true` to fully filter out touch events when activites are obscured, `false` otherwise.

  - ### getActivityTheme

    public final int getActivityTheme()

  - ### setActivityTheme

    public final void setActivityTheme(@StyleRes int themeId)
    Sets theme that will be used by activity launched from these UiSettings. Defaults to theme set at your app level.
    Parameters:
      `themeId` - custom theme to be used

  - ### setCameraSettings

    public final void setCameraSettings(@NonNull CameraSettings cameraSettings)
    Sets camera settings that will be used for scanning
    Parameters:
      `cameraSettings` - to be used for scanning

  - ### saveToIntent

    @CallSuper public void saveToIntent(@NonNull android.content.Intent intent)
    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.
    Parameters:
      `intent` - Intent to which this scan activity settings should be saved.
    Throws:
      `IllegalStateException` - If the intent target activity has not been explicitly set before calling this method.
      `IllegalArgumentException` - If the target activity is not compatible with this settings.

  - ### getTargetActivity

    @NonNull public abstract Class<?> getTargetActivity()
    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.
    Returns:
      target activity.

  - ### createOverlayController

    @NonNull public abstract ScanOverlayType createOverlayController(@NonNull android.app.Activity activity, @NonNull ScanResultListener scanResultListener)
    Creates overlay controller and configures it using set values.