I want to calculate available Internal Stora开发者_运维技巧ge Memory in MB ?
How can i get the value of that ?
Please Help me........
hi chirag using the following function you can calculate available Internal Storage Memory in MB.
StatFs stat = new StatFs(Environment.getDataDirectory().getPath());
long bytesAvailable = (long)stat.getFreeBlocks() * (long)stat.getBlockSize();;
long megAvailable = bytesAvailable / 1048576;
enjoy...........
精彩评论