How to launch another app in the background?

Viewed 5419

I'm launching my app on boot up but I want it to start up in the background.

Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("my.app");
if (launchIntent != null) {
   context.startActivity(launchIntent);//null pointer check in case package name was not found
}

Any idea how to do that without the app start up in the foreground?

3 Answers
Related