So my problem is:
- I start App1, open Screen1 and then Screen2.
- I press Home, leaving App1 in the background.
- I open App2 and start App1.Screen1 with FLAG_ACTIVITY_NEW_TASK expecting to be on App1.Screen2 in the previously left task. Instead, I'm on App1.Screen1 and the system called onNewIntent().
When I press back, it brings Screen2 and Screen1 again. I don't use any other intent flags or launch modes.
Could someone explain what's happening??
taskAffinity
takes precedence overFLAG_ACTIVITY_NEW_TASK
. If you want ActivityB to be in a different task than ActivityA you need to give it a differenttaskAffinity
. But yes, I agree, there are tons of bugs related to activities and tasks :-) – Helainehelali