I am trying to implement block functionality in my app. There is only one activity that allows the user to block others. However this activity can be accessed using 4 different flow.
Use Case:
When a user is blocked the back stack needs to be cleared and the user should be redirected to the screen that started the flow.
Since I don't know which flow was used by the user to reach the profile screen, I cannot explicitly launch any activity using Intent.
Please suggest a way.
Edit
Adding navigation flows.
Flow 1:
Homescreen -> Tab 1 (Contains List of elements) -> Element Details Screen -> Block Screen.
Flow 2:
Homescreen -> Tab 1 (Contains List of elements) -> Element Details Screen -> Mutual Connection Screen -> Block Screen.
Flow 3:
Homescreen -> List of Connections Screen -> Connection Details Screen -> Block Screen.
Flow 4:
HomeScreen -> Tab 3 -> Find from friends -> Block Screen