On an Android device, where they are running many app's, would allow an interface where the user can see what's app installed and which are running at the moment, and you can start, pause and uninstall an app.
On an Android device, where they are running many app's, would allow an interface where the user can see what's app installed and which are running at the moment, and you can start, pause and uninstall an app.
As the response in SO-en the method should be called this way (% with% is only available in API level 14 ):
Uri packageUri = Uri.parse("package:org.PACOTE");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageUri);
startActivity(uninstallIntent);
(Up to API Level 20) To list applications that are running (or recently running) as is SO- en the code should look something like:
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("Aplicativo executado", "Aplicativo: " + recentTasks.get(i).baseActivity.toShortString() + "\t\t ID: " + recentTasks.get(i).id);
}
For API Level 21 use ACTION_UNINSTALL_PACKAGE