I have two different application called App A and App B.
- App A : ActivityA with launch mode -> "singleTask"
- App B : ActivityB with launch mode -> "singleInstance"
Steps:
- Open App A which will open ActivityA, ActivityStack : ActivityA
- Starting App B with startActivityForResult(), ActivityStack : ActivityA > ActivityB
- Open ActivityA via Intent from Activity B , ActivityStack : ActivityA > ActivityB > ActivityA
As you can see the activity stack, It creates new instance of the Activity A instead of returning to the same instance of the ActivityA by calling onNewIntent() method.
I am not sure, is this because of Activity started for result.? Please help to provide proper solution in this scenario. Thank you.