I have tried different ways to get the screen size of the device, but it always returned me the wrong size (791x480 instead of 854x480). It might be du
I was facing the same problem on an Android 3.2 tablet. I tested both getRealSize and getDisplayMetrics. They are expected to crash as they meant to be available on API 17. But strangely getDisplayMetrics doesn't crash on my 3.2 and returns the correct dimension. getRealSize crashes.