Skip to content

Instantly share code, notes, and snippets.

Last active Apr 12, 2018
What would you like to do?
jclass fieldClass = env->FindClass("com/initishbhatt/kotilnjnisample/NativeStore");
jfieldID fieldId = env->GetStaticFieldID(fieldClass, "booleanField", "Z");
if (fieldId == NULL) {
__android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "fieldId == null");
} else {
jboolean fieldValue = env->GetStaticBooleanField(fieldClass, fieldId);
__android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "Field value: %d ", fieldValue);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment