How to call Java API from Native C / C ++ in Android

There are many examples of Android C / C ++ supporting Java APIs. However, all of these examples I've read are Java API APIs for Android first and then native calls other Java APIs using the JNI-ENV passed in.

Without the JNI-ENV passed in, how can C / C ++ get it? Is it possible what C / C ++ is calling Java APIs in Android when creating JavaVM? If yes, please share links. I went through one CoCos2dx project that I couldn't find clear details. github.com/nokia-developer/cocos2d-x-qt/tree/master/

Thanks in advance!

+3


source to share





All Articles