Click here to Skip to main content
15,886,100 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I want to display current running tasks in android for that i am using

XML
ActivityManager actvityManager = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
        List<RunningTaskInfo> procInfos = actvityManager.getRunningTasks(1000);



        //int a=procInfos.size();
        Toast.makeText(getApplicationContext(), ""+procInfos.size(), 100).show();
        Toast.makeText(getApplicationContext(), ""+procInfos, 100).show();
        Log.d("tasks", ""+procInfos.size());



but i am getting wrong count please help me
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900