hello folks, i’m aware this is 😶 but would really appreciate someone’s help:
I have an Activity A in my app which is launched as part of Chrome’s task. This Activity opens Activity B which is part of an external library. Now, the problem is when the app is open with Splash Activity S(the app has its own task), when Activity B finishes, it navigates user to S (since both have the same affinity) instead of taking it back to A. I already used
Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK
while launching A from Chrome, but it does not clear the Activity S, instead I can see my apps task in recents.
I also tried
allowReparenting
on the external Activity B. However, it did not work.
stackoverflow link -
https://stackoverflow.com/questions/71626001/how-to-clear-task-with-a-different-affinity