开发者

Error when using ActivityManager.RunningTaskInfo

开发者 https://www.devze.com 2023-03-17 07:53 出处:网络
I am running android 2.1 and wants to get currently running apps, after running following code I am getting error: The application has stopped unexpectedly

I am running android 2.1 and wants to get currently running apps, after running following code I am getting error: The application has stopped unexpectedly

ActivityManager mgr = (ActivityManager)context.getSystemService(ACTIVITY_SERVICE);
List<Ac开发者_Python百科tivityManager.RunningTaskInfo> tasks = mgr.getRunningTasks(100);   //error

Pls help.


Add the GET_TASKS permission to your manifest.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号