Samsung S6 Edge has the screen dimensions 1440x2560 pixels.
But that does not help me, as I need it in dp. How can I programatically find the dp dimensions(width and height) of an Android device?
px = dp * (dpi / 160)
dp = px / (dpi / 160)
dp = px * 160 / dpi
Remember that dp stands for 'density-independent pixel' - i.e., 1dp is the same physical size on a ldpi device as it is on an xxhdpi device. Therefore you should expect all phones to have roughly ~300-400dp of width, noting the bucket sizes by dp: