why dose my app in android shows wrong size of External memory? <p>i want to get size of External memory in my app. my code doesn't work properly because i have 16 Gb External Memory size but my app shows me 5 GB :</p> <pre><code>import android.os.Environment; import android.os.StatFs; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; import java.io.File; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getTotalExternalMemorySize(); } public boolean externalMemoryAvailable() { return android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED); } public void getTotalExternalMemorySize() { TextView textView= (TextView) findViewById(R.id.ExternalSize); if (externalMemoryAvailable()) { File path = Environment.getExternalStorageDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSizeLong(); long totalBlocks = stat.getBlockCountLong(); textView.setText(String.valueOf(totalBlocks * blockSize/1073741824)); //1073741824 to convert to GB }else{ textView.setText("There is no External memory"); } } } </code></pre> <p>i don't know why, i will appreciate to show me what's wrong?</p>