ABBYY Mobile Imaging SDK 1.0

Go to: Contents | Programmer's Guide

Sample for Android

ABBYY Mobile Imaging SDK provides a code sample written in Java that can be compiled into the MISample application. The sample package is located in the Android\Sample folder and includes the Eclipse project that can be imported to your Eclipse workspace and the compiled application as the MobileImagingSample.apk file.

The sample can be run on an Android device. To do that, copy the MobileImagingSample.apk file from the Android\Sample folder to the device, install it and run.

Note. The Android device must have the ARMv7 processor.

To run the sample on an Android Virtual Device, see the sections below.

How to Build the Sample in Eclipse

You can build the sample in Eclipse. To do that, create a new Eclipse project and import the MipNative sample as described below:

After that, the MainActivity project is appeared in the Package Explorer pane in Eclipse.

Now the sample can be built by selecting the Build Project item in the Project menu.

Note. If the Build Automatically item of the Project menu is selected, Eclipse automatically performs incremental builds whenever resources are saved or modified, so the project is build after creation.

How to Run the Sample on an Android Virtual Device

After the project with the sample is created and built, you can run the application.

To run the application in the Android emulator, create an Android Virtual Device (AVD) in Eclipse:

After that, select the Run>Run As>Android Application item in the menu bar and the sample will be installed automatically on AVD in Eclipse after compilation. Also during the compilation, the application file (MobileImagingSample.apk) is created in the bin folder of the project.

How to Work with the Sample

Using the MISample application, you can open an existing image (the Open Photo button) or take a new photo (the New Photo button), select image processor, and click the Run button to apply it to the image. The image processors correspond to the ABBYY Mobile Imaging SDK functions. The detailed description of the image processors is available as Javadoc in the MobileImagingEngine_Doc.jar file.

To save the improved image to the JPG or PDF file, press the Export button.

To cancel all improvements made in the image, press the Reset button.