ABBYY Mobile OCR Engine - Need native code for Android Wrapper

  • Last Post 31 May 2018
js_newbie posted this 23 May 2018


I am using Xamarin Forms trying to integrate ABBYY Mobile OCR Engine.

I am working with the Android Wrapper and following these procedures,


1.Load the library:

  1. Load the license file into an asset and create an AssetDataSource object initialized with the corresponding AssetManager. Create a FileLicense object, passing to the constructor the data source object, the license file name and the application ID string. If you do not know your application ID, contact your sales manager.

  2. Create an instance of the Engine class with the help of the createInstance method. Pass the license object you created to this method. It also requires a list of DataSource objects which specify the location of resource files. If you load the resource files with ".mp3" extension as described above, you do not need to specify the dataFilesExtensions parameter.

2.Specify recognition settings:

    1. Create a RecognitionConfiguration object. Set recognition languages with the help of the setRecognitionLanguages method. Before the call to this method, make sure that the resources of an application have files of the specified languages; otherwise, IOException will be thrown. The isLanguageAvailableForOcr and isLanguageAvailableForBcr methods of the Engine class can be used to check if the language you need is available.

    2. Create a RecognitionManager object using the getRecognitionManager method of the Engine class, passing the configured RecognitionConfiguration as the input parameter.

3.Recognize the image:


    1. Load the image into memory ( or configure the input stream ( with the image.

    2. Call the recognizeText method of the RecognitionManager class.


I have followed the steps but little confused on how/what to assign for input parameters.


Please provide me with native code for the above steps and also for the implementation(code) for business card method, so that I could use that in Xamarin.


In the Android wrapper of the library, business card recognition is implemented by the recognizeBusinessCard method of the RecognitionManager class. 



Order By: Standard | Newest | Votes
js_newbie posted this 24 May 2018


I have created an object for FileLicense but I'm getting the following error,

FileLicense _fileLicense = new FileLicense(ads, "license.License", "ApplicationId");


No implementation found for void[], int) (tried Java_com_abbyy_mobile_ocr4_DataArray_pushChunk and Java_com_abbyy_mobile_ocr4_DataArray_pushChunk___3BI)

Any idea how to solve this anyone?


Thanks in advance

Oksana S. posted this 31 May 2018

Officially we do not support Xamarin and do not have an Xamarin wrapper (and samples) for any of our mobile SDKs. So, unfortunately, we cannot give you any practical recommendations. We provide Mobile OCR Engine as Objective C and Java Wrappers for iOS and Android. You can try to bind these libraries to your Xamarin project using the instructions on the Xamarin web-site. For example, here is the details on binding .JAR library (Android wrapper). Also on the Xamarin Developers Portal there is also the article that can be used as a reference on how to link native libraries to the project: Using Native Libraries for Android.

Regarding the “No implementation found for...” message, we found a similar case where the same issue occurred because the assets were added to the customer’s project as links instead of being copied. In case the links get broken when directory structure changes, such message may occur. Could you please check this? Is this the reason of the issue?