title: how to get fullscreeen height on S9 and similar?
body: <p>My current android code to retrieve the screen height in pixels is this:</p>
  
  <pre><code>Resources.getSystem().getDisplayMetrics().heightPixels
  </code></pre>
  
  <p>However when the app is running in full screen mode on Samsung S9 (and probably on similar devices) the returned height is the same as it is when the app is not running fullscreen, i.e. it is calculated without the buttons menu bar that is gone when we're in fullscreen.</p>
  
  <p>Any ideas on a better way to retrieve the height or possibly to be aware of the fact that the app is running full screen?</p>