Bad License

  • Last Post 03 July 2013
abhi posted this 05 April 2013

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

Order By: Standard | Newest | Votes
Anastasia Galimova posted this 05 April 2013

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 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.

Gleb Pendler posted this 20 June 2013

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

thanks in advance.

Anastasia Galimova posted this 02 July 2013

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)?

Gleb Pendler posted this 03 July 2013

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

P.S: we used filename ""

thanks in advance.

Anastasia Galimova posted this 03 July 2013

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.