sample-textcapture — a code sample illustrating the use of the Android OCR library for capturing the text from the camera preview

sample-datacapture — a code sample illustrating the use of the Android OCR library for capturing data that matches a regular expression

Note that you'll need some additional files for translation functionality or recognizing Chinese, Japanese, and Korean languages. Contact sales to get them.

Try code samples

Try out our code samples to see how the technology works, or use some of the code in your own application to get up and running. The samples should be open and built from the same folder where they are located in the distribution package.

Important! Please change the application ID before building, modifying or otherwise using any of the samples.

Build your application with the OCR library for Android

To create an application which uses ABBYY Real-Time Recognition SDK to capture text from the camera preview, you will need to add the library and its assets to your project. This is required for new projects only — packaged code samples work out of the box.

If you are using a Maven or Ivy repository, add the ABBYY Real-Time Recognition SDK package there. If not, you can copy the library file (abbyy-rtr-sdk-1.0.aar) to your project or another folder and add this location as a flat repository. For example, add the following to the top-level build.gradle file in your project:

Add the library dependency to the module-level build.gradle file. For example:

dependencies { compile(name:'abbyy-rtr-sdk-1.0', ext:'aar')}

Copy the assets you need from the distribution to your project's assets (by default, app/src/main/assets). There are three types of resources used by the library: dictionaries, patterns, and translation dictionaries. See Minimize Your Memory Footprint for a short description of the necessary resources.

Important! With common licenses, your Android OCR application needs an Internet connection to gather the information about the current state of the library. Include the following line into your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

If the application was unable to connect to the Internet for 90 days, the library will not be available until the connection is restored. To remove this limitation, please contact sales.