I tried with:

```
Resources.getSystem().getDisplayMetrics().widthPixels

```

and:

```
Resources.getSystem().getDisplayMetrics().heightPixels

```

but when my app goes in standby for a long time, on the wake up the two lines above return 0.

EDIT: I would like to place these values into static and final field.