In an application I am working on a Chrome Tab is used for an external OAuth flow. At the end of the flow the Custom Tab stays open with an informational message, and an email is sent that has a custom scheme link.
Until Android 10 clicking the email link would return to the app, close the tab, and continue doing whatever it needs to. To achieve that we are using an TabLauncherActivity
that starts the tab and a SchemeHandlerActivity
that receives the scheme from the email and launches TabLauncherActivity
with FLAG_ACTIVITY_CLEAR_TOP
effectively returning to the previous instance and clearing the tab and the SchemeHandlerActivity
from the stack.
Enter Android 11. The app is brought to the foreground by the link but the Chrome Tab refuses to close. Closing it manually will resume the expected flow.
The application is not targeting 11 yet. I know that there are some limitations on inter-app communications but not targeting the platform I would hope that there would be no problem.
Any ideas on what the issue might be would be more than welcome.
Thanks.