One of my users get a pixel per inch value of 0.288. ( getPixelsperInch=0.288 )
I am using the following code to determine the pixelperinche. What am I doing wrong here ?
His Screensize is 976/600. With my own devices I get reasonable values. The problematic device is a "UTOK700Q".
public float getPixelsperInch() {
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
float fpixelperinch = dm.xdpi;
return fpixelperinch;
}
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
int iScreenHeight = metrics.heightPixels;
int iScreenWidth = metrics.widthPixels;