0

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:

My goal is to record AudioData from Oboe and send the data to Java on a different thread.

Muhammad Faizan
  • 353
  • 4
  • 15
  • 1
    You haven't shown us any code, so it isn't really clear what you have tried and what the results were. One approach is to resolve all the Java classes when your native library is loaded, and create global references to them so that you can save them for later use. – Michael Jan 14 '21 at 09:10
  • 1
    You are probably looking for something like this: http://jnicookbook.owsiak.org/recipe-no-027/; however, without source code it's hard to say. – Oo.oO Jan 15 '21 at 11:37

0 Answers0