I've got a strange issue while working with intent flags. I will try to explain as clear as possible.

I have 3 Activities in my app. Dashboard Activity, Document Activity, and Child Activity. I've started Dashboard Activity with default intent flags. Now from that I want to open document activity as a separate one in recent screens so, from Dashboard I've started Document Activity with FLAG_ACTIVITY_NEW_DOCUMENT flag. Now from Document activity, I've opened Child Activity with FLAG_ACTIVITY_NEW_TASK due to some requirements. Everything was perfect until now.

Now when I press back from Child Activity, it is not going back to Document Activity but goes straight to Dashboard Activity. But If I start Child Activity with default intents(No FLAG_ACTIVITY_NEW_TASK) it works just fine (i.e back pressing from Child Activity goes to Document Activity).

Any help to fix this issue is really appreciated.

P.S: I can't avoid those flags while starting those respective activities.

Thank you!

0

There are 0 best solutions below