Help: Calling system to get screen properties from C++

I want to obtain some data from the Android Device:

[Java]
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
float w = dm.widthPixels;
float h = dm.heightPixels;
float xdpi = dm.xdpi;
float ydpi = dm.ydpi;

How can make this from C++ with JNI?

Thnx!