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