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

1 comment:

  1. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    IPhone App Development| Android apps developer

    ReplyDelete