title: Calling nonstatic method on Android from JNI
body: <p>I want to call a non-static method on Android using JNI. I can call static methods using  <code>CallStaticVoidMethod</code>. To call non-static methods, I have used <code>CallVoidMethod</code>. It is not working.</p>
  
  <p>Can anybody please tell me correct code to call nonStatic method of Android From JNI?</p>
  
  <pre><code>jmethodID method = env-&gt;GetMethodID(gJniRefCached.ImsFwkLoaderClass, "DispVideo", "([BII)V");
  </code></pre>
  
  <p>env->CallVoidMethod(gJniRefCached.ImsFwkLoaderClass, method,arr,width,height);</p>
  
  <p>I have also tried using object of class that code is 
  <code>jclass cls = env-&gt;GetObjectClass(obj); 
   jmethodID method = env-&gt;GetMethodID(cls, "DispVideo", "([BII)V");
  env-&gt;CallVoidMethod(cls, method,arr,width,height);
  </code></p>