Android How do you get total memory RAM in the device?

前端 未结 3 1611
误落风尘
误落风尘 2020-12-10 11:35

I can get total available memory by:

ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
MemoryInfo memoryInfo = new Acti         


        
3条回答
  •  囚心锁ツ
    2020-12-10 12:25

    If you don't find something else, you could bypass android and read /proc/meminfo which is what the 'free' command on a more ordinary linux distribution does

提交回复
热议问题