« Writing Android Apps with HTML5 JavaScript | Main | Autodesk exchange Portathon event – update »

08/30/2013

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Igor Ganapolsky

It is not apparent, from your code, what the Java method `invokeMemberFuncFromNative()` looks like. Where is its implementation?

Philippe Leefsma

The full project is attached to that post, just download the zip and take a look...

Teja K

I’m trying to invoke Java method from native code. I was able to run your attached project and saw desired output.
But when I run the project by keeping only “invokeMemberFuncFromNative” call, I’m getting following error. Can you please help to identify the issue?
java.lang.NoSuchMethodError: no non-static method


sampa bhande

It is very relevant information. it is very useful for those people who wants more knowledge about android.

jo jo

wow, this is amazing! Thanks for providing this clear demonstration of how to hook into java objects and methods from cpp.
I'm still confused by this, though I've seen it in a few examples now
jmethodID methodId = env->GetMethodID(cls, "", "(I)V");

is the constructor always associated with (I)V? Seems like magic.

Philippe Leefsma

Hi there, I wrote the article a while ago and since then I didn't used NDK much but yes, that syntax seems to be the way to import constructor. See there for more details: https://stackoverflow.com/questions/9286661/calling-a-constructor-fails-in-jni-android

The comments to this entry are closed.

February 2017

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Autodesk Blogs

Share


Cloud and Mobile RSS Feed

Related Posts Plugin for WordPress, Blogger...