You can access all fields and methods as described in the Java
Android DisplayMetrics API
as shown here with the method setToDefaults() and the field
densityDpi. Before you use a view field, you should always call
setToDefaults to initiate to the default values of the device.

Currently only JavaMethod, JavaStaticMethod, JavaField,
JavaStaticField and JavaMultipleMethod are built into PyJNIus,
therefore such constructs like registerListener or something like this
must still be coded in Java. For this the Android module described
below is available to access some of the hardware on Android devices.

Returns an (x, y, z) tuple of floats that gives the sensor reading, the
units depend on the sensor as shown on the Java API page for
SensorEvent.
The sesnor must be enabled before this function is called. If the tuple
contains three zero values, the accelerometer is not enabled, not
available, defective, has not returned a reading, or the device is in
free-fall.