title: Why is this code incorrectly reporting free space on my Android device?
body: <p>My Samsung X-Cover2 GT-S7710 with a 32GB SD card reports correct space in Settings>Storage, but only 0.6 GB with this code or <a href="https://stackoverflow.com/questions/2941552/android-sd-card-free-space">How can I check how much free space an SD card mounted on an Android device has?</a>:</p>
  
  <pre><code>sdStorageDirectory = Environment.getExternalStorageDirectory().getPath();
  StatFs statSd = new StatFs(sdStorageDirectory);
  Log.d(TAG, "gb available " + String.valueOf((double) (statSd.getAvailableBlocks() * statSd.getBlockSize()) / 1073741824));
  </code></pre>
  
  <p>Why is this, and how can I discover the true free space correctly?</p>