[android-developers] Need Help : calling a non-static Java method from C in Android

2009-12-21 Thread Latha Shivanna
Hi All In my Android app, I need to call a non static java method from C/C++. But i get a blunt crash when i do it using GetMethodID/CallVoidMethod()1 methods. I have done like this: 1. Register the method using GetMethodID() as follows (mine is a cpp file): jmethodID xyz =

Re: [android-developers] Need Help : calling a non-static Java method from C in Android

2009-12-21 Thread kavitha sunil
Hi, Use env-CallVoidMethod(obj, xyz); and not cls obj can be obtained by jmethodID init = env-GetMethodID(gcls, init,()V); obj = env-NewGlobalRef(env-NewObject(cls, init)); Try this. This should work. On Tue, Dec 22, 2009 at 11:24 AM, Latha Shivanna latha...@gmail.com wrote: Hi All