Code Samples

The ABBYY Mobile Capture SDK distribution package includes several code samples that show API usage and provide examples of typical scenarios.

The code samples are found in the root folder of the distribution package. All samples are provided in Java.

Sample scenario Folder name Description
Text Capture sample-textcapture
A simple text capture scenario. The only setting available to the user is the text language.
Data Capture sample-datacapture
The general data capture scenario showing how to capture a predefined document and a custom data field.
sample-ui-datacapture-swift This sample illustrates the steps you need to perform to create a mobile application for data capture from document.
Image Capture sample-imagecapture This simple image capture scenario demonstrates how to automatically capture an image from the smartphone video preview frames.
sample-ui-imagecapture The image capture scenario for capturing single page from the video-stream, using the special API for user interface implementation.
sample-ui-imagecapture-multipage The sample code implementing a multipage image capture scenario with tuned user interface.
sample-ui-imagecapture-flexicapture The sample demonstrating how to send several captured by ABBYY Mobile Capture images to the ABBYY FlexiCapture back-end (Application Server or FlexiCapture Cloud) for further processing. To investigate API, used in this sample, see the Web Services Mobile API in the FlexiCapture Developer's Help.
sample-imagecapture-camera2 The image capture scenario demonstrating how to automatically capture an image using android.hardware.camera2 special package for Android.
Core API sample-coreapi
The sample demonstrates a simple scenario of a single image processing with the core API.

Configuring the code samples

The samples can be opened and built right from where they are in the downloaded distribution package. To work with any of the code samples you need to do only a little configuring first.

  1. Please change the application ID before building, modifying or otherwise using any of the samples.
  2. All samples expect that the license file (named license) is found into the assets folder located in the distribution package root. Copy your license to this folder and rename the file if necessary (a license obtained from your supplier may have a different name).
    You can also change the license file name in the sample code as below:

public class MainActivity extends Activity {

   // Licensing
   private static final String licenseFileName = "license";

3/2/2022 12:59:15 PM

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.