I want to launch the installed app2 from app1, the simple method is as follow:
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.package.app2");
startActivity(LaunchIntent);
But I also want to make sure that app2 and app1 are in different task stack:
eg. when I launch app2 from app1 and press home button, then I open the task list, I'll see both app1 and app2 from the list, and both of them can be successfully called back.
The state of the app1 should be what it is just before I call app2 from app1.
What else should I do to achieve this?