Android - How to track the memory usage of an any running app on device programmatically?

前端 未结 1 840
余生分开走
余生分开走 2021-01-12 22:58

How to check that how much memory(RAM) is getting consumed by any of currently running app on device?

Thanks.

相关标签:
1条回答
  • 2021-01-12 23:13

    Look at the ActivityManager.

    getRunningAppProcesses will get you a list of PIDs, and then getProcessMemoryInfo will give you memory details about them.

    See the following thread for an complete, in-depth answer: How do I discover memory usage of my application in Android?.

    0 讨论(0)
提交回复
热议问题