Class FieldByFieldUISettings
java.lang.Object
com.microblink.photopay.uisettings.UISettings<FieldByFieldOverlayController>
com.microblink.photopay.uisettings.FieldByFieldUISettings
- All Implemented Interfaces:
CurrentImageListenerUIOptions
,DebugImageListenerUIOptions
,HelpIntentUIOptions
,OcrResultDisplayUIOptions
,SplashScreenUIOptions
,SuccessfulImageListenerUIOptions
public class FieldByFieldUISettings
extends UISettings<FieldByFieldOverlayController>
implements HelpIntentUIOptions, OcrResultDisplayUIOptions, DebugImageListenerUIOptions, CurrentImageListenerUIOptions, SuccessfulImageListenerUIOptions, SplashScreenUIOptions
Scan settings for
FieldByFieldScanActivity
.-
Constructor Summary
ConstructorsConstructorDescriptionFieldByFieldUISettings
(android.content.Intent intent) FieldByFieldUISettings
(FieldByFieldBundle fieldByFieldBundle) -
Method Summary
Modifier and TypeMethodDescriptioncreateOverlayController
(android.app.Activity activity, ScanResultListener scanResultListener) Creates overlay controller and configures it using set values.Returns theFieldByFieldBundle
containing scan elements with parsers that will be used for processing.Class<?>
Returns target activity.final void
saveToIntent
(android.content.Intent intent) Saves this scan activity settings toIntent
so it can be passed to the corresponding scan activity.void
setCurrentImageListener
(CurrentImageListener currentImageListener) Sets implementation ofCurrentImageListener
interface that will obtain images that are currently being processed.void
setDebugImageListener
(DebugImageListener debugImageListener) Sets implementation ofDebugImageListener
interface that will obtain images that are being processed.void
setHelpIntent
(android.content.Intent helpIntent) Defines intent for help activity called when help should be shown.void
setInfiniteLoopScan
(boolean infiniteLoopScan) If set totrue
, scan activity will never return.void
setOcrResultDisplayMode
(OcrResultDisplayMode ocrResultDisplayMode) Defines mode in which OCR result will be drawn on camera preview.final 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
setSuccessfulImageListener
(SuccessfulImageListener successfulImageListener) Sets implementation ofSuccessfulImageListener
interface that will obtain images from the successful scan.Methods inherited from class com.microblink.photopay.uisettings.UISettings
getActivityTheme, getFilterTouchesWhenObscured, getUsingFlagSecure, setActivityTheme, setCameraSettings, setFilterTouchesWhenObscured, setUsingFlagSecure
-
Constructor Details
-
FieldByFieldUISettings
-
FieldByFieldUISettings
public FieldByFieldUISettings(@NonNull android.content.Intent intent)
-
-
Method Details
-
getFieldByFieldBundle
Returns theFieldByFieldBundle
containing scan elements with parsers that will be used for processing.- Returns:
- the
FieldByFieldBundle
containing scan elements with parsers that will be used for processing.
-
setHelpIntent
public void setHelpIntent(@Nullable android.content.Intent helpIntent) Description copied from interface:HelpIntentUIOptions
Defines intent for help activity called when help should be shown. If not set or set to null, help button will not be shown in the scanning UI.- Specified by:
setHelpIntent
in interfaceHelpIntentUIOptions
- Parameters:
helpIntent
- intent for help activity called when help should be shown.
-
saveToIntent
public final void saveToIntent(@NonNull android.content.Intent intent) Description copied from class:UISettings
Saves this scan activity settings toIntent
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 classUISettings<FieldByFieldOverlayController>
- Parameters:
intent
- Intent to which this scan activity settings should be saved.
-
setInfiniteLoopScan
public void setInfiniteLoopScan(boolean infiniteLoopScan) If set totrue
, scan activity will never return. Default isfalse
.- Parameters:
infiniteLoopScan
- whether to activate infinite loop mode or not.
-
setOcrResultDisplayMode
Description copied from interface:OcrResultDisplayUIOptions
Defines mode in which OCR result will be drawn on camera preview.- Specified by:
setOcrResultDisplayMode
in interfaceOcrResultDisplayUIOptions
- Parameters:
ocrResultDisplayMode
- mode in which OCR result will be drawn on camera preview.
-
setDebugImageListener
Description copied from interface:DebugImageListenerUIOptions
Sets implementation ofDebugImageListener
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 interfaceDebugImageListenerUIOptions
- Parameters:
debugImageListener
- Implementation of debug image listener ornull
to clear listener that has been set previously.
-
setCurrentImageListener
Description copied from interface:CurrentImageListenerUIOptions
Sets implementation ofCurrentImageListener
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 interfaceCurrentImageListenerUIOptions
- Parameters:
currentImageListener
- Implementation of image listener ornull
to clear listener that has been set previously.
-
setSuccessfulImageListener
Description copied from interface:SuccessfulImageListenerUIOptions
Sets implementation ofSuccessfulImageListener
interface that will obtain images from the successful scan.SuccessfulImageListener
will receive image when recognition process has successfully scanned an item and has a successful scan image to return.- Specified by:
setSuccessfulImageListener
in interfaceSuccessfulImageListenerUIOptions
- Parameters:
successfulImageListener
- Implementation of image listener ornull
to clear listener that has been set previously.
-
setSplashScreenLayoutResourceID
public final void setSplashScreenLayoutResourceID(@LayoutRes 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 interfaceSplashScreenUIOptions
- Parameters:
splashScreenLayoutResourceID
- ID of the layout resource that will be used as camera splash screen displayed while camera is being initialized.
-
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 useActivityRunner
. DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.- Specified by:
getTargetActivity
in classUISettings<FieldByFieldOverlayController>
- Returns:
- target activity.
-
createOverlayController
@NonNull public FieldByFieldOverlayController 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 classUISettings<FieldByFieldOverlayController>
-