Android FindJavaClass For Activity
I'm trying to do some C++ JNI programming that's called from a BP method, but JNI is unable to find the class. Here's a little test code, to find the android/app/Activity class and then find the "finish" method.
Unfortunately, the game crashes when it can't find the activity class.
I've made this work in the past by adding a NDK plugin that detects classes in the special JNI init callback. But this time I'd just like to find a class when the BP function is called.
I have a hunch that I need to use the class loader to find the Activity class.
My goal is to get the Activity class, get the Bundle, so I can detect some extra data that is passed to the Activity.
This sample code once working will be enough to figure the rest out.
So my question is why is this line failing?
asked Nov 15 '18 at 05:36 AM in C++ Programming
answered Nov 15 '18 at 05:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here