jni accessing jobjectArray from jobject

Viewed 819

I have jobject and its has jobjectArray inside ,I am using GetObjectField to get jobjectArray and then casting it , but its not working can anyone help ?


 jfieldID representationArrayF = env->GetFieldID(className, "representationArray", "[Lcodec/video/initial/MMRepresentation");
 jobject objectArr=(jobject)env->GetObjectField(jpresentationInfo, representationArrayF);
 jobjectArray*  objectArray=reinterpret_cast<jobjectArray*>(&objectArr);
 jobject representation=(jobject) env->GetObjectArrayElement(*objectArray, i)
1 Answers

it is silly mistake which is fine with simple parameters but with array parameters it not working instead of [Lcodec/video/initial/MMRepresentation , i have to put [Lcodec/video/initial/MMRepresentation; semicolon at end

don't know with simple parameters like III semicolon is not necessary

Related