Builder class

Creates an instance of a MultiPageImageCaptureScenario class and manages the settings of the scenario, represented by this instance.

Builder constructor receives the following parameters:

  • Engine object via which image processing is performed;
  • page storage for storing captured images and all corresponding information. Page storage can be set as following:
    • default storage located in the default folder. Pass context to use this page storage. A thrown Exception means that a path to the storage is invalid.
    • custom folder with a default storage. Pass the full path to the custom folder to use this page storage. If the path is invalid, an Exception is thrown.
    • custom storage. To use this type of storage, implement a PageStorage interface and pass it to the constructor.

 Important! In case a custom folder is used, read/write permissions should be granted for the application. To do this, use the setAdditionalPermissions method of the ExtendedSettings interface.

public class Builder {
  public Builder(Engine engine, Context context) throws Exception;
  public Builder(Engine engine, String path) throws Exception;
  public Builder(Engine engine, PageStorage pageStorage);
}

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

Methods

 Important! All methods should be called from the Android Main Thread.

Name Description
build Returns an instance of a MultiPageImageCaptureScenario class.
setRequiredPageCount Sets total number of pages to be captured.
setCaptureSettings Sets additional multipage image capture scenario processing settings.
setShowPreviewEnabled Enables and disables image preview after capture.
setStartAsEditorAtPage

Sets one of the previously captured images as a start page by its identifier. The image with this identifier will be displayed at the scenario beginning. In order to show the camera view at the beginning of the scenario, skip this method or pass null.

 Note: This method becomes available after some images are been captured and saved. Before the first image capture scenario start only the camera view can be shown.

setUISettings Sets appearance settings to the pages.

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.