title: Get physical display size in inch, Android?
body: <p>Is there any way to get physical height and width of screen grammatically. </p>
  
  <p>I tried this one</p>
  
  <pre><code>        DisplayMetrics dm = new DisplayMetrics();
          getWindowManager().getDefaultDisplay().getMetrics(dm);
          double x = Math.pow(dm.widthPixels/dm.xdpi, 2);
          double y = Math.pow(dm.heightPixels/dm.ydpi, 2);
          double screenInches = Math.sqrt(x+y);
  </code></pre>
  
  <p>What else I found is, in Portrait and Landscape it returning different values.</p>
  
  <p>and it's giving height probably, on my nexus it's 4.41 something. Any one have idea/suggestion here? </p>