I am trying to run JNI methods like FindClass, GetMethodID... on a different thread but it keeps giving me error saying can't find class because of calling these function in a different thread. I have searched about this on web and found some solutions but couldn't get them to work. I have searched in the following links:
- FindClass from any thread in Android JNI
- Call static Java method from separate thread using JNI
- Calling java method from different thread in ndk
My goal is to record AudioData from Oboe and send the data to Java on a different thread.