if i use the code shown here to get the total screen size it is always short on height to the total screen size as shown in the documented specs for the device. for example
You are right, It is showing you the resolution of your app screen and hence you getting the difference.Instead of getMetrics(), use getRealMetrics(). You can use the following code to get the actual screen size of device.
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
DisplayMetrics metrics = new DisplayMetrics();
display.getRealMetrics(metrics);
int width = metrics.widthPixels;
int height = metrics.heightPixels;
return width + "*" + height;