I am using the following snippet to check if the applications that I finish()ed are really working:
ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> procList = am.getRunningAppProcesses();
for (ActivityManager.RunningAppProcessInfo proc : procList)
Log.d(TAG, proc.processName);
}
To my horror, some of the applications that I finish()ed (in their Activity.onCreate (), even before they had the ability to run anything) are still listed there.
Why?
LogCat shows that these applications onDestroy() were definitely .
What does it take to really remove an application from this list?
Is there killProcess()my only resource?
source
share