On my code I have 2 apps.
the app a that starts app b, like a launcher.
the code app a looks like that:
Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage("com.test.vayo");
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
finish();
the code on app B:
Intent intent = new Intent(this.context, first.class);
intent.setFlags(intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
context.startActivity(intent);
finish();
my problem that to start task b only if a didnt start the app b.For that I am trying to bring to front the task that already running and not to start all activities from the root one, just to bring to front back stack of the privous task.
for that I am using FLAG_ACTIVITY_REORDER_TO_FRONT its works only if I run first app b and the app a, but if I run a and then run b it isnt working,its starts b from the root activity.
I did it with flags one flag on the app a and the other one on the app b, the flag