I have an Activity A
which starts doing some processing in its view model, meanwhile it launches a CustomTab
which puts A
in the background, when the viewmodel finishes its processing it requires to prompt the user to Activity B
on top of the current one so I am aiming for a backstack like
A
-> CustomTab
-> B
However when I launch B
from A
the CustomTab activity stays on top until I close it manually, I am not sure if I am ending with a stack like this:
A
-> B
-> CustomTab
Or if B is not launched because A
is not on the foreground.
Is there any way to move B
on top? I have checked other questions that suggest using SINGLE_TOP
and CLEAR_TOP
on A but that will finish both A
and CustomTab
and I need them to stay alive so when B
finishes it comes back to the browser.