Detect Your Android Device's Resolution in Pixels(px) and DiPs(dp) Head over to the release page for download. If you would like to use the code: Copy DisplayCapabilities.java into your project The methods within are pretty self-explainatory.