-
- All Implemented Interfaces:
-
com.abbyy.mobile.uicomponents.scenario.CaptureScenario
public final class MultiPageImageCaptureScenario extends BaseCaptureScenarioProvides access to the multipage image capture scenario management.
This class helps to easily integrate the image capture technology into your application and manage the scenario when more than one image has to be captured.
An instance of this class is created via the build method of the Builder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMultiPageImageCaptureScenario.BuilderCreates an instance of MultiPageImageCaptureScenario and manages the settings of the scenario, represented by this instance.
public interfaceMultiPageImageCaptureScenario.PageStorageAPI for implementing a custom image storage.
Most common scenarios will work with the default page storage. PageStorage interface is intended for advanced users and specific scenarios.
PageStorage can be represented as a collection of pages, where each page is assigned with a unique identifier (GUID) and is itself a key-value collection with string keys and arbitrary data values (byte[]/NSData). Key-value relationship is to be maintained on the client side. An example of a key is an image or a thumbnail.
The default implementation of the PageStorage is file-based. By default it has a root folder located in application's internal storage. Each page is stored in a subfolder of the root folder named with page's identifier. All page-related data, such as captured image and its properties, is stored in files inside the corresponding subfolder.
Methods can be used for creation and managing pages of the image storage.
This logic is also used in the custom image storage implementation with the PageStorage interface and its methods.
To use the implemented custom storage instead of the default one, use the corresponding Builder.
This interface and its methods are to be implemented on the client side.
public final classMultiPageImageCaptureScenario.ResultProvides access to the result of a multipage document capture.
public interfaceMultiPageImageCaptureScenario.CallbackThe callback for MultiPageImageCaptureScenario.
public enumMultiPageImageCaptureScenario.ResourceTypeString resources for MultiPageImageCaptureScenario that should be shown according to the corresponding view control.
public interfaceMultiPageImageCaptureScenario.UISettingsProvides access to extra user interface settings of current view control.
public interfaceMultiPageImageCaptureScenario.CaptureSettingsManages the image capture process of a certain page.
-
Field Summary
Fields Modifier and Type Field Description private final Engineengine
-
Method Summary
Modifier and Type Method Description final Unitstart()Starts the multipage image capture scenario execution. final Unitstop()Stops automatic and manual capture and releases the resources. final UnitcloseView()Stops capture process and calls onClose method of the Callback interface. final UnitsetAutoCaptureEnabled(Boolean isEnabled)Enables the real-time capture from the camera preview. final UnitsetShowPreviewEnabled(Boolean isShowPreviewEnabled)Enables and disables image preview after capture. final UnitsetCallback(MultiPageImageCaptureScenario.Callback callback)Sets the callback object for current multipage image capture scenario. final MultiPageImageCaptureScenario.ResultgetResult()Provides access to the result, represented by an internal Result object. final EnginegetEngine()-
-
Method Detail
-
start
@MainThread() final Unit start()
Starts the multipage image capture scenario execution.
This method can be called before the camera launch. In this case scenario will start simultaneously with the camera.
Note: The scenario is started automatically by default. If you want to delay the start, use the stop method to stop the automatically started scenario and then start it with start method.
-
closeView
@MainThread() final Unit closeView()
Stops capture process and calls onClose method of the Callback interface.
-
setAutoCaptureEnabled
@MainThread() final Unit setAutoCaptureEnabled(Boolean isEnabled)
Enables the real-time capture from the camera preview. If the auto-capture mode is disabled, the image should be captured manually.
- Parameters:
isEnabled- Set true to enable the automatic capture from the camera preview and false to enable manual capture mode.
-
setShowPreviewEnabled
@MainThread() final Unit setShowPreviewEnabled(Boolean isShowPreviewEnabled)
Enables and disables image preview after capture.
-
setCallback
@MainThread() final Unit setCallback(MultiPageImageCaptureScenario.Callback callback)
Sets the callback object for current multipage image capture scenario.
-
getResult
@MainThread() final MultiPageImageCaptureScenario.Result getResult()
Provides access to the result, represented by an internal Result object.
-
getEngine
final Engine getEngine()
-
-
-
-