I am creating two custom plugins for android use this plugin described in my plugin.xml. My plugin.xml file like
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.my.mybiometric"
version="1.2">
<name>myBiometric</name>
<description>myBiometric Plugin</description>
<license>Apache 2.0</license>
<keywords>media,upload</keywords>
<engines>
<engine name="cordova-android" version=">=3.4.0" />
</engines>
<js-module src="www/js/Media2.js" name="Media2">
<clobbers target="mediaRec.startRecord" />
</js-module>
<js-module src="www/js/VoiceUpload.js" name="VoiceUpload">
<clobbers target="VoiceUpload" />
</js-module>
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="Media2">
<param name="android-package" value="com.my.mybiometric.AudioHandler"/>
</feature>
<feature name="VoiceUpload">
<param name="android-package" value="com.my.mybiometric.UploadHandler"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity
android:name="com.my.mybiometric.myBiometric"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="orientation|screenSize|keyboardHidden">
</activity>
</config-file>
<source-file src="platforms/android/src/com/my/plugins/AudioHandler.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/UploadHandler.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/AppLog.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/MyResponseHandler.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/Recorder.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/VoiceBiometricClient.java" target-dir="src/com/my/mybiometric" />
<source-file src="platforms/android/src/com/my/plugins/VoiceBiometricClientUsage.java" target-dir="src/com/my/mybiometric" />
</platform>
</plugin>
after build and run the project the media2 plugin is working fine but when i call the voiceupload plugin its return the "class not found" error for voice upload i am using "android-async-http-1.4.4.jar". I add the jar file into libs folder i added manually. How to fix this issue?
In plugin.xml you add the line
<source-file src="platforms/android/src/libs/android-async-http-1.4.4.jar" target-dir="libs" />
no 3.
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