How to get a list of String stored in a Java HashMap as a value

61 views Asked by At

So, I have a hashmap declared in kotlin as:

var hm = hashMapOf("in1" to arrayListOf("a","b","c"))

I want the value of "in1" in JNI, for that this is what I'm doing & my app is crashing, can someone help me out?

class hashMap = env->GetObjectClass(hm);
jmethodID getID = env->GetMethodID(hashMap, "get", "(Ljava/lang/String;)[Ljava/lang/String;");
jobjectArray value = (jobjectArray) env->CallObjectMethod(hm,getID,(jstring) "in1");
0

There are 0 answers