Class UISettings<ScanOverlayType extends ScanningOverlay>
- java.lang.Object
-
- com.microblink.documentverification.uisettings.UISettings<ScanOverlayType>
-
- Direct Known Subclasses:
DocumentVerificationUISettings
public abstract class UISettings<ScanOverlayType extends ScanningOverlay> extends java.lang.ObjectBase 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ScanOverlayTypecreateOverlayController(android.app.Activity activity, ScanResultListener scanResultListener)Creates overlay controller and configures it using set values.intgetActivityTheme()booleangetFilterTouchesWhenObscured()abstract java.lang.Class<?>getTargetActivity()Returns target activity.booleangetUsingFlagSecure()voidsaveToIntent(android.content.Intent intent)Saves this scan activity settings toIntentso it can be passed to the corresponding scan activity.voidsetActivityTheme(int themeId)Sets theme that will be used by activity launched from these UiSettings.voidsetCameraSettings(CameraSettings cameraSettings)Sets camera settings that will be used for scanningvoidsetFilterTouchesWhenObscured(boolean filterTouchesWhenObscured)Defines whether the framework should discard touches when the activity's window is obscured by another visible window.voidsetUsingFlagSecure(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.
-
-
-
Method Detail
-
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 isfalse. Use this to prevent taking screenshots of the activity window content and to prevent content from being viewed on non-secure displays- Parameters:
usingFlagSecure-trueto request using of FLAG_SECURE,falseotherwise.
-
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 isfalse. 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-trueto fully filter out touch events when activites are obscured,falseotherwise.
-
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 toIntentso 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:
java.lang.IllegalStateException- If the intent target activity has not been explicitly set before calling this method.java.lang.IllegalArgumentException- If the target activity is not compatible with this settings.
-
getTargetActivity
@NonNull public abstract java.lang.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 useActivityRunner. 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.
-
-