0

How can I kill other applications? I can launch other applications using intents but can't find a way to kill them.

This launches the application:

Intent i = new Intent();
    i.setAction(Intent.ACTION_MAIN);
    i.addCategory(Intent.CATEGORY_LAUNCHER);
    i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    i.setComponent(
        new ComponentName("com.bla.bla...", 
            "com.bla.bla.Main"));
    context.startActivity(i);

I've tried to use the activity manager's kill

killBackgroundProcesses(String packageName)

but that does nothing.

I've also tried

 appContext.stopService(intent)

but that did nothing

Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
Luke
  • 331
  • 2
  • 5
  • 11

0 Answers0