title: CallIntMethod result -1 - ANDROID JNI
body: <p>I would like to use the ANDROID SharedPreferences from C.
  For easier usage, I've a class and some methods for it (getIniParamInt, getIniParamString etc.) The things works fine in JAVA.</p>
  
  <p>The  problem is, if I call the method from jni it sends back -1 to C.
  Parts of my JAVA code (simplified for test, SharedPref. removed etc.):</p>
  
  <pre><code>public class IniManipulate {
     public int getIniParamInt(String mezoNev)
                    {return 999;}  // settings.getInt("abc", -9999);
  </code></pre>
  
  <p>C code:</p>
  
  <pre><code>const char* paramOut 
  paramOut = "abc";
  jmethodID mid = (*env)-&gt;GetMethodID(env,cls1,"getIniParamInt","(Ljava/lang/String;)I");
       if (mid == NULL) {cDebug1 = 888;return; }
  jstring* parameter = (*env)-&gt;NewStringUTF(env, paramOut);
       if (parameter == NULL) {return;}
  jint paramInt = (jint) (*env)-&gt;CallIntMethod(env,thiz, mid, parameter);
  cDebug1 = (int)paramInt;
  </code></pre>
  
  <p>Always returns with paramInt=-1; instead of 999;</p>
  
  <p>I've already digged up the whole web and I couldn't find the solution.
  Could you please help me, what's wrong with the CallIntMethod calling?
  Thanks!</p>