Hi guys!
Sorry for my broken English.
I have not figured out to work with JNI! Please help!
I have java class for example:
class Sample {
public static int sum(int a, int b) {
return a + b;
}
}
By javah i do Sample.h, I connect it to the project.
As I understand it, then I have to create Sample.cpp which describe the method jni_onload (), getmethodid (), getsum ();
Further difficulties arise (:
In the example in the method SimpleAudioEngineJni.cpp getmethodid () is a line:
classOfCocos2dxActivity = env-> FindClass (“org/cocos2dx/lib/Cocos2dxActivity”);
I describe my class? or in the class Cocos2dxActivity describe all methods of class Sample?!
If you have somebody, a detailed description will be very grateful!