i want to get screen size via c. i know that jni support calling java from c. but is there any person who knows another method? i mean get screen size from lowlevel modules
You don't need the buffer but you could use the ANativeWindow class if you pass in a Surface from java.
void Java_com_justinbuser_nativecore_NativeMethods_setSurface(JNIEnv * env, jobject this, jobject surface){
ANativeWindow nativeWindow = ANativeWindow_fromSurface(env, surface);
int width = ANativeWindow_getWidth(renderEngine->nativeWindow);
int height = ANativeWindow_getHeight(renderEngine->nativeWindow);
}