Skip to content

Instantly share code, notes, and snippets.

@initishbhatt
Last active April 12, 2018 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save initishbhatt/4b00146530d3ea3dabcec753cdee63f4 to your computer and use it in GitHub Desktop.
Save initishbhatt/4b00146530d3ea3dabcec753cdee63f4 to your computer and use it in GitHub Desktop.
jclass fieldClass = env->FindClass("com/initishbhatt/kotilnjnisample/NativeStore");
jmethodID methodId = env->GetStaticMethodID(fieldClass, "testMethod", "(I)I");
if (methodId == NULL) {
__android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "methodId == null");
} else {
jint fieldvalue = env->CallStaticIntMethod(fieldClass, methodId, 20,20);
__android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "fieldvalue: %d ", fieldvalue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment