ActivityManager visibility in eclipse
I am trying to use the ActivityManager class to get memory usage statistics of bunch of processes using getMemoryInfo(pids[]). But looks like eclipse is not allowing me instantiate an object for ActivityManager. I'm getting error - ActivityM开发者_Go百科anager() is not visible
Any help is highly appreciated. Thanks, ghatotkach
You do not create an instance of ActivityManager
. You obtain an instance via a call to getSystemService(ACTIVITY_SERVICE)
from your Activity
or Service
.
精彩评论