Calling a Java Function With C++

Hey Guys.

I did a lot of research but I couldn’t find the right answer i was looking for. SO any help would be greatly appreciated :).
So I have this simple function I wrote in GameActivity.java. Now I want to call this function from C++ or Blueprint.
Can anybody help me out?

If you really really really want to do this, Google JNI. Usually this is used to call C or C++ from Java, but it can technically be used to go the other way as well.

I strongly recommend against doing this. It will be way easier for you to just write your code in C++. Why do you want to use Java?

Hey thanks for that. umm I want to integrate AdColony. I personally find Admob banners anoying :).
Can u provide a link or a step by step please?

This is a really bad idea, you’d be better off doing this (assuming you are building an Android app): Is it possible to use Android Java Libraries in UE4 Game (OUYA SDK, Google Play Game Services, etc.)? - Mobile - Epic Developer Community Forums

Yes thank you. Does anybody know how to intergrate Unity ads or adcolony with Android?