获取android 设备可用的本地存储空间剩余大小
File datapath = Environment.getDataDirectory();
StatFs dataFs=new StatFs(datapath.getPath());
long sizes=(long)dataFs.getFreeBlocks()*(long)dataFs.getBlockSize();
long available=sizes/((1024*1024));
本文出自 “菜鸟的进击” 博客,请务必保留此出处http://newandroid.blog.51cto.com/1968798/1408849
Android 获取剩余存储空间,布布扣,bubuko.com
原文地址:http://newandroid.blog.51cto.com/1968798/1408849