DataCaptureScenario class

Provides access to the data capture scenario management. The DataCaptureScenario class object constructor receives an instance of the Engine object, required for connection of the User Interface API with the capture and recognition mechanisms.

Scenario, represented by this class, is started when the setCaptureScenario method of the CaptureView class is called.

Implements the CaptureScenario interface.

class DataCaptureScenario implements CaptureScenario {
   public DataCaptureScenario(Engine engine);

The DataCaptureScenario class constructor throws an exception when the dependencies for the data capture scenario are not set. See the How to Add the Library to Your Android Studio Project to find the dependencies definition.

Nested classes

Name Description
Interfaces
Callback The callback interface of the data capture scenario.
CaptureEventListener Event handler for a data capture scenario. Intended for customization of the default scenario.
CloseListener Listener for the close button.
ExtendedSettings Extended settings of the scenario. Intended for advanced users.
UISettings Provides access to the user interface settings of current view control, that are specific for the data capture scenario.
Classes
AreaOfInterest Sets the width and height of the recognition area via its aspect ratio. The document will be expected inside the recognition area.
CharInfo Extended information about the character position and formatting.
DataField A recognized data field. Provides field's contents, position on image, and included data fields, if applicable.
DataFieldInfo An object holding information about a data field that can be detected on current data scheme.
DataScheme Information on the data scheme applied to the recognized frame.
Image Represents a single captured image.
Result Contains the whole information about the received recognition result.

Methods

Name Description
getExtendedSettings Returns the object with extended settings of the data capture scenario.
getImageCaptureSettings Returns an object providing settings for an image capture step of the current scenario.
isAutoCaptureEnabled Checks if a real-time capture from the camera preview is enabled.
isGalleryButtonEnabled Checks if a button for loading image from gallery is enabled.
isImageCaptureEnabled Checks if an image should be returned to the Result class object.
isLanguagesButtonVisible Checks if a button that opens a screen for choosing recognition languages is visible.
pickImageFromGallery Opens the device gallery to choose an image for capture scenario.
setAutoCaptureEnabled Enables a real-time capture from the camera preview. If the auto-capture mode is disabled, the image should be captured manually.
setCallback Sets a callback object for current data capture scenario.
setCaptureListener Sets a callback listener for events handling. Intended for customization of the default scenario.
setGalleryButtonEnabled Enables or disables a button for loading image from gallery.
setImageCaptureEnabled Enables returning an original image to the Result class object as a bitmap. If disabled, the getImage method of the Result class object will return null.
setUISettings Sets appearance settings, specific for the data capture scenario.
start Starts the data capture scenario execution.
stop Stops capture and releases the resources.

Enumerations

Name Description
CaptureEvent Events that occur during data capture scenario. Intended for customization of the default scenario.
ResourceType

Custom text to be shown as a tip for end-user.

02.03.2022 12:59:15

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.