How Do I Integrate Third-party Libraries in My Mobile Application? (Magic xpa 2.x)
You can integrate third-party libraries in your mobile device application. The integration of the libraries should be done when you compile your application.
Refer to How Do I Use Native OS Code in My Mobile Application? for further information on how to write native code in your application in order to call the libraries.
For iOS devices, simply add the library to your project using Xcode.
There are two types of libraries that can be added to your Android application:
Generic Java libraries
Simply put the library in your application's libs folder (for example, under RIAModules\Android\Source\libs).
For example, refer to the Barcode Scanning using ZBar API sample (program RNC02).
Android Java libraries
Android libraries must be re-built as part of your application.
The MgxpaRC library is an example of an Android library that exists in your Android application.
If you need to add your third-party Android library to the application:
Put the library in a subfolder under your application’s folder (for example, under RIAModules\Android\Source\mylib).
Add a reference to it in the build.xml file, which is located under RIAModules\Android\Source. For example: <property name="android.library.reference.2" value="mylibraryapp" />

-
If your library requires additional permissions, you will need to define them in the AndroidManifest.xml file, which is located under RIAModules\Android\Source.