0

How to check the available memory in android when user is downloading the media into the sdCard

4

1 回答 1

1

You can use the following to check the memory status:

ActivityManager actMgr = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager.MemoryInfo minfo = new ActivityManager.MemoryInfo();
actMgr.getMemoryInfo(minfo);
long mem = minfo.availMem;
于 2012-07-17T13:39:52.883 回答