Looking for v4 JNI help

Hi there,
with the close of SDK box, I am planning to add the needed functionality (inApp purchases etc) by myself. Currently I am using v4 of the c++ version of cocos2d-x.

Are there any best practice tutorials on how to make function calls to .java code and calls back into C++ code for v4 somewhere?
Where should I put the java files? Next to the AppActivity.java in org.cocos2dx.cpp?
Do I need to adjust cmake.txt?
Do I need to change something in Android studio?

Any help is appreciated :slight_smile:

I dont know the answer but I can ask engineering.

That would be great :slight_smile:

Here is my own IAP implementation (now outdated), you can study for jni callbacks:
https://drive.google.com/open?id=1NbuPCny7vEuQoNYYcHgO-M56iEg4lg7-&authuser=supaplex.me%40gmail.com&usp=drive_fs

2 Likes

Thank you @hexerror I will try to make it work.
It is a 3.17 project right?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Thank you again for the example code @hexerror :slight_smile:
I managed to call a native Java function and do the callback into C++ today