public abstract class UISettings
extends java.lang.Object
| Constructor and Description |
|---|
UISettings() |
| Modifier and Type | Method and Description |
|---|---|
abstract ScanningOverlay |
createOverlayController(android.app.Activity activity,
ScanResultListener scanResultListener)
Creates overlay controller and configures it using set values.
|
int |
getActivityTheme() |
boolean |
getFilterTouchesWhenObscured() |
abstract java.lang.Class |
getTargetActivity()
Returns target activity.
|
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. |
void |
setActivityTheme(int themeId)
Sets theme that will be used by activity launched from these UiSettings.
|
void |
setCameraSettings(CameraSettings cameraSettings)
Sets camera settings that will be used for scanning
|
void |
setFilterTouchesWhenObscured(boolean filterTouchesWhenObscured)
Defines whether the framework should discard touches when the activity's window is obscured
by another visible window.
|
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.
|
public final boolean getUsingFlagSecure()
public final void setUsingFlagSecure(boolean usingFlagSecure)
false.
Use this to prevent taking screenshots of the activity window content and to prevent content
from being viewed on non-secure displaysusingFlagSecure - true to request using of FLAG_SECURE, false otherwise.public final boolean getFilterTouchesWhenObscured()
public final void setFilterTouchesWhenObscured(boolean filterTouchesWhenObscured)
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.filterTouchesWhenObscured - true to fully filter out touch events when activites
are obscured, false otherwise.public final int getActivityTheme()
public final void setActivityTheme(@StyleRes
int themeId)
themeId - custom theme to be usedpublic final void setCameraSettings(@NonNull
CameraSettings cameraSettings)
cameraSettings - to be used for scanning@CallSuper
public void saveToIntent(@NonNull
android.content.Intent intent)
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.intent - Intent to which this scan activity settings should be saved.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.@NonNull public abstract java.lang.Class getTargetActivity()
ActivityRunner.
DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.@NonNull public abstract ScanningOverlay createOverlayController(@NonNull android.app.Activity activity, @NonNull ScanResultListener scanResultListener)