i am trying to get background running applications name. Here is my code
ActivityManager am = (ActivityManager)getSystemService(Activity.ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> li = am.getRunningServices(100);
for(ActivityManager.RunningServiceInfo list2 : li){
Log.d("DEBUG: ", "Background process: " + list2.process);
Log.d("DEBUG: ", "Background pid: " + list2.pid);
}
How can i take application name or package name from the above code?
do we have some other way to find background running applications name?
Maybe you can try the following approach (meanwhile you should check the code because I didn’t check it)