How to calculate free memory on Android when SD card is formatted as internal on M
问题 I am calculating the free internal storage space using the code below: StatFs statInt = new StatFs(intPath); bytesAvailableInt = (long) statInt.getAvailableBlocksLong() * (long) statInt.getBlockSizeLong(); where intPath is the path to the internal storage. The above code works fine except the case where on Android M, the SD card is formatted as internal storage - in this case, the above code returns the real internal storage free space, not the real + sd card free space combined. Is there