This tutorial shows how to run an Android Java demo using LEADTOOLS.
|Summary||This tutorial covers how to properly add your LEADTOOLS license files and run the Android Demos shipped with the LEADTOOLS SDK.|
|Completion Time||15 minutes|
|Runtime License||Download LEADTOOLS|
Navigate to one of the Android demo projects and open it in Android Studio.
For the purposes of this demo, we will be setting up and running the MICR demo found at the following default installation location:
<INSTALL_DIR>\LEADTOOLS Android EVAL 21\Examples\Android\MicrDemo.
If you do not have the Android Native Binaries and Projects ZIP on your machine proceed as follows:
Navigate the project structure to the directory
MicrDemo\micrDemo\src\main\res\raw. If the
raw folder does not exist in this directory, create a subfolder named
raw in the
LEADTOOLS.LIC license file into this folder. Ensure that the license file that is copied over is using the lower-case naming convention
license.lic instead of its automatic upper-case naming convention.
Next, navigate to the directory
MicrDemo\micrDemo\src\main\java\leadtools.micrdemo\MicrDemoActivity, and open the JAVA file. The following modifications need to be made to these two lines of code:
int licenseResourceId = R.raw.license;
Support.setLicense(this, licenseResourceId, "dev_key"); // Update "dev_key" with the string inside the LEADTOOLS.LIC.key file being used
"dev_key"parameter needs to be replaced with the string contained inside your developer key file in order to set the license correctly.
To run the Android demo, press
Shift + F10 or click Run -> Run <APP_NAME>.
In this tutorial, we covered where to locate the LEADTOOLS Android demo projects, add the LEADTOOLS LIC file to the project, and properly set the LEADTOOLS license to run the Android demo projects.