I want to get all running app on my android device. Maybe, need to use PackageManager
? I have tried used to PackageManager
, but I did not succeed, maybe, you have better decision?
Asked
Active
Viewed 1,685 times
-3

Phantômaxx
- 37,901
- 21
- 84
- 115

VladislawFox
- 31
- 4
-
All running app or all installed app ? – rushank shah Jul 25 '17 at 10:32
3 Answers
1
Using below code you can get running application list
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> runningAppProcessInfo = am.getRunningAppProcesses();

subrahmanyam boyapati
- 2,836
- 1
- 18
- 28
1
You can detect information about running process using ActivityManager
.
I think you should check with these same questions here:

BlakeR
- 33
- 6
1
I suggest the following thread. Your question has already been answered.
ActivityManager has method getRunningTasks(int). ActivityManager seems to be the solution you are searching for.
final ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
final List<RunningTaskInfo> recentTasks = activityManager.getRunningTasks(Integer.MAX_VALUE);
for (int i = 0; i < recentTasks.size(); i++)
{
Log.d("Executed app", "Application executed : " +recentTasks.get(i).baseActivity.toShortString()+ "\t\t ID: "+recentTasks.get(i).id+"");
}

jackabe
- 345
- 9
- 23