This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get the total disk space available on this Android Device | |
* | |
* @return total size (in bytes) that is the total disk space avaialble on the device. | |
*/ | |
public static long getTotalDiskSpace() { | |
StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath()); | |
long totalDiskSpace = statFs.getBlockCount() * statFs.getBlockSize(); | |
return totalDiskSpace; | |
} |