title: How to call Java function with int parameter from JNI
body: <p>I have a static Java function in an Activity. This function has int parameter. I want to call this function from JNI. I use below code to call, but I don't know how to pass int parameter:</p>
  
  <p>In Java:</p>
  
  <pre><code>public static void updateTopScoreLeaderboard(int score) {
      Log.i("", "updateTopScoreLeaderboard " + score);
  }
  </code></pre>
  
  <p>In JNI:</p>
  
  <pre><code>if (JniHelper::getStaticMethodInfo(methodInfo, "com/nch/myApp/MyActivity", "updateTopScoreLeaderboard", "()V"))
  {
      methodInfo.env-&gt;CallStaticObjectMethod(methodInfo.classID, methodInfo.methodID);
  }
  methodInfo.env-&gt;DeleteLocalRef(methodInfo.classID);
  </code></pre>
  
  <p>That code work well if Java function has no param. But in this case (has int param), it not work.</p>