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 without calling java.
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
public class MainActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Log.v("getWidth", Integer.toString(getWindowManager().getDefaultDisplay().getWidth()));
Log.v("getHeight", Integer.toString(getWindowManager().getDefaultDisplay().getHeight()));
}
}
i think /dev/graphics is related to my questions
See Question&Answers more detail:os