I have a method that returns device width size in IN/MM.
private double checkDeviceSizeInInches(){
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
double xSize = Math.pow(dm.widthPixels/dm.xdpi,2);
double y = Math.pow(dm.heightPixels/dm.ydpi,2);
return Math.sqrt(xSize);
}
On all of the devices that i was testing it was ok, except on Samsung Galaxy Stratosphere 2. You can see on the image below that this method returns 76mm for the width(that is not correct).
What do you think, is there any problem with the device or ?
Device spec link : http://www.samsung.com/us/mobile/cell-phones/SCH-I415SAAVZW