Friday, September 16, 2011

Calculate Available Internal Storage memory

StatFs stat = new StatFs(Environment.getDataDirectory().getPath());
long bytesAvailable = (long)stat.getFreeBlocks() * (long)stat.getBlockSize();;
long megAvailable = bytesAvailable / 1048576;

Here megAvailable display available Internal Storage Memory

No comments:

Post a Comment

Post a Comment