Hi Jon,

First, thank you for taking the time to create such it a detailed response,
it's greatly appreciated

Based on what you said, I've made the ctor public in the .java file.

I then changed my JNI code to this, but I get an error on the
JNIEnv.GetMethodID call.

    IntPtr _helperClass = JNIEnv.FindClass("MagHelper/jni_helper");
    IntPtr ctor = JNIEnv.GetMethodID(_helperClass, "<init>", "()V"); 
    IntPtr instance = JNIEnv.NewObject(_helperClass, ctor);

    IntPtr methodId = JNIEnv.GetMethodID(instance, "InitializeReader",
"()V");
    JNIEnv.CallVoidMethod(instance, methodId); 

When I call JNIEnv.GetMethodID should it be on the instance or the class?
Does the method name look correct since InitializeReader in the .java file
takes no parms and returns a void? 

I think I'm close, I just need that little extra push.

Thanks
DML

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

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to