I have developed the application Using Mobile OCR Android using Abby OCR but when i copied the licence file in my project folder i m getting the error "Bad License".

I would be thankful, If anyone could somehow guide me in the above said matter.

Thanks in advance Abhi

asked 05 Apr '13, 14:09

abhi's gravatar image


Hello abhi,

This error message means that you have not specified the license in your code properly. If you use our sample for Android, you should do the following:

  • put the license file in the "assets" folder,
  • specify the license file name in the code: open SampleApplication.java file and change the line

    private static final String _licenseFile = "license";


private static final String _licenseFile = "<your_license_file_name>";

Please let us know about the result.


answered 05 Apr '13, 20:03

Anastasia%20Galimova's gravatar image

Anastasia Ga... ♦♦

I have the same problem, and you solution didn't work for me :( and other options to try?

thanks in advance.


answered 20 Jun '13, 20:23

Gleb%20Pendler's gravatar image

Gleb Pendler

Could you please specify:

  • the sample code you use (for iOS/for Android/etc),

  • the version of MSDK you use (you could see it in helpfile->Introduction)?

(02 Jul '13, 15:33) Anastasia Ga... ♦♦

We used Android sample code. We keep getting the error message when trying to use "com.abbyy.mobile.ocr4.sample" project as library. We even tried to import the project to a new / empty project and still nothing.

P.S: we used filename "889_11_MobileOCR.Android.zip"

thanks in advance.

(03 Jul '13, 03:07) Gleb Pendler

As it is written in Mobile OCR helpfile→Wrapper for Android→Licensing→License, the object of the BadLicenseException type is thrown if the license is invalid. So probably some license parameters were incorrect during FileLicense class creation.

As it is described in our Mobile OCR helpfile→Wrapper for Android→Licensing→FileLicense article, the FileLicense class contains the following parameters:

public FileLicense( 
final DataSource dataSource, // The source of the license file
final String fileName, // The path to the license file relative to the source specified in the dataSource parameter 
final String applicationId // A string containing the application identification. 

So the FileLicense class creation could look like:

new FileLicense(assetDataSource, "D:\%AndroidApplication%\%\License\ABCD00000000000000.ABBYY.License", "your_ApplicationID");

We hope this information will be useful. Please inform us about the results.

This answer is marked "community wiki".

answered 03 Jul '13, 16:12

Anastasia%20Galimova's gravatar image

Anastasia Ga... ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Apr '13, 14:09

Seen: 2,061 times

Last updated: 03 Jul '13, 16:12

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal