I have this code inside a service:
PackageManager pm = app.getPackageManager();
Intent intent = pm.getLaunchIntentForPackage(app.getPackageName());
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
app.startActivity(intent);
And this opens the app on top of task stack. I would like to know if is possible to start the app on the low, on background. That if you press the task manager button on the phone it displays the app. Is there a way?
Thanks