I'm using ionic (cordova) CLI to build our application. Since it's a cordova app, cordova is handling the build process and gradle scripts. I'm looking for a way to configure cordova to use the lib during compile but not include it into the app.

I mean, on Zebra Technologies devices, where you need the com.symbol.emdk library to control our additional functionality, you use this setup. If you need to target different devices you can setup the Gradle project with different "flavours".

The com.symbol.emdk.jar which gets installed during the EMDK installer can be used only for compiling applications. This stubbed version and does not contain the actual source. So you should never copy the com.symbol.emdk.jar into your applications lib folder.

Choices are:

1. If you are using Android Studio or Eclipse and want use Android API 16 or 19, select the EMDK API in the Android or Eclipse to build the application in the build target.

2. If you are using the Android Studio or Eclipse, but use google API and EMDK together, select on of the add-on in the build target and add the other as external library.

3. If you are using the Build script to build your project, you can use like

4. if you are using the gradle to build your project, then use the com.symbol.emdk.jar in dependencies of your gradle file as below:

You need to add the below to your gradle file, where EMDKSDK specifies folder where your com.symbol.emdk.jar is located. In this sample I am using the relative path.

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs')

compile fileTree("..\\..\\EMDKSDK\\com.symbol.emdk.jar")}

The overall comment is use com.symbol.emdk.jar for compiling application, never deploy this as part of your application. This way the application does not need to recompile there apps when the EMDK team release news patches and fixes. Installing the EMDK OS update will deploy the corresponding run times on the device and specifying <uses-libraryandroid:name="com.symbol.emdk"/> in your app tells the android to dynamically use the library on device.