I use the below code to get the width of a Galaxy S6 screen in pixels
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
Log.i("INFO", "width pixels "+metrics.widthPixels);
On one app this returns 1440 which is correct as per Samsung. On another app the same code returns 1080 ??
density also changes from 4 to 3 as well as xdpi 580 to 435
Any ideas why I'm getting two different results? Both apps target the same SDK: 23 and min SDK: 10