I have an app, that has several activities and one of them is acting like “reminder popup style” activity. This activity defined as NEW_TASK and is launched from service. But the problem is when this activity shows up, it always brings to front the previous stack from my app, even if some other app was already in foreground.
Please see the diagram below:
The behaviour I want to achieve is when Popup Activity is being closed bring to front the "Some Other App" if it was in foreground before the Popup Activity showed up. Currently always the Activity C of "My App stack 1" is coming to front.