Custom tab closes when user switches apps
I just ran into this problem. Basically, my service uses 2FA, which makes the users switch to another app to approve the request. The custom tab is finished as soon as the user moves away from it. The reason is that the intent is created with FLAG_ACTIVITY_NO_HISTORY. I understand there are reasons to use that flag, but it creates a problem when users need to switch to another app to continue.
Is there a workaround for this?
This was first reported in #105, but it was closed without much chance to discuss.
It's something I'd have to investigate in more detail. It seems odd that the 2FA flow is closing the custom tab; I would have thought that the tab would have to be explicitly dismissed by the user or the app to disappear from the context of that task.
OK, just tried playing around with this. If FLAG_ACTIVITY_NO_HISTORY is not set, then in the demo app pressing back after authorization in the custom tab brings that custom tab back. I'll see if there is a way to force that custom tab activity to finish(), which I think would have the desired effect without using NO_HISTORY.
This is now fixed by #109.