I need to include 3rd party plugin .jar
to my custom cordova plugin.
I can't find any way to do this.
f.e. some of my actual code looks like this (in plugin.xml
):
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="AztecReader">
<param name="android-package" value="com.example.aztecreadermobilas.AztecReaderPlugin"/>
</feature>
</config-file>
<source-file src="src/android/AztecReaderPlugin.java" target-dir="src/com/example/aztecreadermobilas" />
</platform>
Libraries I need to include:
/libs
/armeabi
/libAztecLibrary.so
/armeabi_v2
/libAzteclibraryv2.so
/AztecReader.jar
I found an example potentially covering your use case:
https://github.com/phonegap/phonegap-plugin-fast-canvas/blob/master/plugin.xml
Have a look at line 31. It seems that precompiled libraries (in this case Android/libs/armeabi/libFastCanvasJNI.so) may be included via source-file directive.
I don't know if this will work for java class files as well. You may accomplish this by extracting the jar and adding each contained class file as source-file. Just have a try.
AztecReader seems to be available as source code, so you could at the sources (java files) directly to your plugin. They will be compiled during app build. This seems to be the obviously easiest way to integrate the reader in your plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With