How can i execute void AndroidSystem::initialise (JNIEnv* env, jobject act, jstring file, jstring dataDir)


Hi there,

I wrote my own JNI cpp class and to be able use threads I need to run threadLocalJNIEnvHolder.initialise (env); that is in the juce_android_systemStats.cpp. I also see that this function is executed by AndroidSystem::initialise (JNIEnv* env, jobject act, jstring file, jstring dataDir), but I have no idea how to call this method. This is my code now:


extern "C" {

JNIEXPORT void Java_com_test_Test_startNative(JNIEnv *env, jobject obj) {

 // How can I use AndroidSystem::initialise(env,);
 //and threadLocalJNIEnvHolder.initialise (env); ??

 // Here I do some stuff with thread (and I do not need the context yet)
 TaskExecutor taskExecutor;



Thanks in advanve!



not sure of your goal here, but you dont have to tell JNI about your threas unless you call back into java.