JNI: Long-object created with wrong value
- by Torbjörn Eklund
Hi!
I am writing a c-jni function in Android, and I am having problems with creating a Long-object. I have succeeded in calling the constructor, but when I read the value of the object with longValue, I get the wrong result.
jmethodID longConstructor;
jmethodID longGetLongValue;
jclass cls;
jobject obj;
// Create a object of type Long.
cls =…