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.
精彩评论