I was trying to get the screen resolution of android phones,using this code
DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDi
Disable pre-scaling by adding this line to your manifest file:
Position:
...
After that your display will not be scaled anymore, and you also get the correct display resolution.