How to send callback from Java code to unreal C++ using JNI?

I am creating an app using Android native api.

I managed to call Java code from C++ using JNI but not sure about how I can send a callback from the Java code to C++.

It would be appreciated if anyone could share me the sample code or articles about it.

I happened to be searching for this too, and from what I can tell there seems to be a good answear here:

I haven’t used this yet so if it’s outdated and no longer works we might have to look for something else.