Reputation: 17257
I am working on an Android project using C++ for the main development and I am trying to implement OpenFeint. I need to call several non-static Java methods and instantiate a couple of classes in my C++ code, and for that I need to learn how to properly use JNI functions.
Where can I find some comprehensive documentation or tutorial on the matter? What I have found so far in Sun's site is incomplete or lackluster, and does not even have the class-method reference.
Upvotes: 0
Views: 657
Reputation: 550
IBM has an excellent step by step tutorial for JNI After you cover it you will feel confident in utilizing JNI.
Besides that I also recommend JNI tutorial on Youtube
Upvotes: 1
Reputation: 2789
I have always found the JNI Programmer's guide to be very useful.
Other than that if you post your questions more directly am sure SO will help.
And specifically this section might help
Upvotes: 2
Reputation: 15656
Not sure how much of it applies to android, but the official jni specification is here. The members of jniEnv are listed as c functions, in c++ the first parameter (jniEnv) falls away.
Upvotes: 2
Reputation: 14119
Unfortunately there is not much good documentation about the JNI.
But you can have a look here. What you need is maybe creation and of course invocation.
Upvotes: 0