Amended Java source and C++ libs

Amended code in Java source so that Intents are correctly handled.
Changed JNI function name in C++ source so that it is compatible with
the plugin.