I was trying to get the screen resolution of android phones,using this code
DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDi
This seems to be working..though i dont know if its a right method..
DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); density=dm.densityDpi; width=(density/160)*dm.widthPixels; height=(density/160)*dm.heightPixels;