开发者

Error when using ActivityManager.RunningTaskInfo

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜