我想了解adroid中所有应用使用的缓存总量,有什么建议吗?
答案 0 :(得分:1)
希望这能帮到你
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
System.out.println("Available Memory : " + memoryInfo.availMem);
System.out.println("Thresold Memory : " + memoryInfo.threshold);
System.out.println("Total Memory : " + memoryInfo.totalMem);