public final class DocumentCaptureUISettings extends UISettings implements DebugImageListenerUIOptions, SplashScreenUIOptions, BeepSoundUIOptions, StyleUIOptions, StringsUIOptions
Constructor and Description |
---|
DocumentCaptureUISettings(DocumentCaptureRecognizerTransferable documentCaptureRecognizerTransferable) |
DocumentCaptureUISettings(android.content.Intent intent) |
Modifier and Type | Method and Description |
---|---|
DocumentCaptureOverlayController |
createOverlayController(android.app.Activity activity,
ScanResultListener scanResultListener)
Creates overlay controller and configures it using set values.
|
DocumentCaptureRecognizerTransferable |
getDocumentCaptureRecognizerTransferable() |
java.lang.Class |
getTargetActivity()
Returns target activity.
|
void |
saveToIntent(android.content.Intent intent)
Saves this scan activity settings to
Intent so it can be passed to the
corresponding scan activity. |
void |
setBeepSoundResourceID(int beepSoundResourceID)
Defines the resource ID of the sound to be played when recognition is successful.
|
void |
setDebugImageListener(DebugImageListener debugImageListener)
Sets implementation of
DebugImageListener interface that will obtain images that are
being processed. |
void |
setOverlayViewStyle(int styleResourceID)
Provide your own style to replace default icons and colors.
|
void |
setSplashScreenLayoutResourceID(int splashScreenLayoutResourceID)
Defines the ID of the layout resource that will be used as camera splash screen displayed
while camera is being initialized.
|
void |
setStrings(DetectionOverlayStrings strings)
Sets strings that will be used in the UI.
|
getActivityTheme, getFilterTouchesWhenObscured, getUsingFlagSecure, setActivityTheme, setCameraSettings, setFilterTouchesWhenObscured, setUsingFlagSecure
public DocumentCaptureUISettings(@NonNull DocumentCaptureRecognizerTransferable documentCaptureRecognizerTransferable)
public DocumentCaptureUISettings(@NonNull android.content.Intent intent)
@NonNull public DocumentCaptureRecognizerTransferable getDocumentCaptureRecognizerTransferable()
@NonNull public java.lang.Class getTargetActivity()
UISettings
ActivityRunner
.
DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.getTargetActivity
in class UISettings
public void saveToIntent(@NonNull android.content.Intent intent)
UISettings
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.saveToIntent
in class UISettings
intent
- Intent to which this scan activity settings should be saved.public void setOverlayViewStyle(@StyleRes int styleResourceID)
setOverlayViewStyle
in interface StyleUIOptions
styleResourceID
- your stylepublic void setStrings(@NonNull DetectionOverlayStrings strings)
setStrings
in interface StringsUIOptions
strings
- strings that will be usedpublic final void setBeepSoundResourceID(int beepSoundResourceID)
BeepSoundUIOptions
setBeepSoundResourceID
in interface BeepSoundUIOptions
beepSoundResourceID
- resource ID of the sound to be played when recognition is successful.public final void setSplashScreenLayoutResourceID(@LayoutRes int splashScreenLayoutResourceID)
SplashScreenUIOptions
setSplashScreenLayoutResourceID
in interface SplashScreenUIOptions
splashScreenLayoutResourceID
- ID of the layout resource that will be used as camera
splash screen displayed while camera is being initialized.public final void setDebugImageListener(@Nullable DebugImageListener debugImageListener)
DebugImageListenerUIOptions
DebugImageListener
interface that will obtain images that are
being processed. DebugImageListener will receive all possible debug images that become
available during recognition process.setDebugImageListener
in interface DebugImageListenerUIOptions
debugImageListener
- Implementation of debug image listener or null
to clear listener
that has been set previously.@NonNull public DocumentCaptureOverlayController createOverlayController(@NonNull android.app.Activity activity, @NonNull ScanResultListener scanResultListener)
UISettings
createOverlayController
in class UISettings