Showing posts with label Calculate Total Internal Storage memory. Show all posts
Showing posts with label Calculate Total Internal Storage memory. Show all posts

Friday, September 16, 2011

Calculate Total Internal Storage memory

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

Here megAvailable display total Internal Storage Memory