0

我想知道android中所有应用程序使用的缓存总量,有什么建议吗?

4

1 回答 1

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);
于 2013-09-10T04:56:30.673 回答