Is it possible to make calls between C++ and Java?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By beocat
:warning: Old Version Published before Godot 3 was released.

I would like to know if it is possible to make calls between C++ and Java - and how to do it … It is for a Android/iOS module I’m making.

If you have any examples I would be happy to see them.

Cheers

This is not specific to Godot, you may find more examples on the web about how to do it. I think you have to use JNI (Java Native Interface) to make calls between the two, though I don’t know if Godot has some helpers for that (maybe looking in https://github.com/godotengine/godot/tree/master/platform/android ?)

Zylann | 2017-01-15 21:26

Thanks for your reply. I have only a superficial knowledge of JNI, so I just hoped somebody in the Godot community had some experience or some example code to share. Guess I’m going to learn something new…

beocat | 2017-01-16 11:44