[mono-android] JNI Help Please

digitalml matthew.lebo at stationcasinos.com
Mon Jan 16 20:16:16 UTC 2012


Hi Jon,

An update to my previous post...

I looked into that sanity check code and updated my code based on it's
example.

IntPtr helperClass = JNIEnv.FindClass("MagHelper/jni_helper");
IntPtr ctor = JNIEnv.GetMethodID(helperClass, "<init>", "()V");
IntPtr methodId = JNIEnv.GetMethodID(helperClass, "InitializeReader",
"()V");
IntPtr instance = JNIEnv.NewObject(helperClass, ctor);
JNIEnv.CallVoidMethod(instance, methodId);
JNIEnv.DeleteLocalRef(instance);

This fails on the JNIEnv.CallVoidMethod() call.  Is there a way to see what
the error actually is? Maybe it's from the java side?  Maybe my methodId is
wrong?

Thanks
DML

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/JNI-Help-Please-tp5144171p5149760.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list