added JAR source-file to plugin.xml
rewrite to use cordova events in js