-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Custom tab are not correctly launched #157
Comments
Yes, this is something I have been well aware of (sadly). However, there has been very recent progress on this: #156 |
Ooh interesting, thanks for the quick answer 👍 |
@ThexXTURBOXx Do you have a rough estimate of when this issue might be resolved? Like next week or next month? Just to know if I can wait, or if I need to do something else. If it's months, no worries, I'll adapt! Because even with |
I wanted to test this PR last weekend, but I did not have enough time for that, sadly. |
Tested it a few minutes ago and released version |
Thanks a lot, I tested it, works great! Completely solve the issue 👍 |
Perfect, thank you very much for the feedback! :) |
Description
Related to #93 and #33
This lib was soo close to be the one amount the enormous list of lib for the same use case (https://www.reddit.com/r/FlutterDev/comments/16a8jbq/my_head_is_exploding_ive_found_9_different/ , and it's not even a full list..).
Thanks for this, this is almost perfect.
But something is wrong in the way the custom tab is launched in Android. I don't think the flag "FLAG_ACTIVITY_NEW_TASK" should not be used at all, but the way it's done, we have to use it (I get this error without it :
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
).It's not just a matter of flag, the custom tab is launched in a way that when you check the "recent app screen" (with the smartphone button, or gesture), you can see that the custom tab is not launched on top of the app, but as a "separate app" (or task if it's the correct term). No matter if using FLAG_ACTIVITY_NO_HISTORY or not, it's still showed as a separate app.
Minimal Reproduction
Steps to reproduce the behaviour:
Run the example app, once the login is successfull, try to go back, the custom tab reapear.
If you use
ephemeralIntentFlags
, this fix the first issue, but you cannot put the app in the background.No matter what flag you use, the custom tab is shown on the "recent app screen" separately from the app, which is not correct, because you can access the app directly there, bypassing the custom tab, (leaving it open if you don't use
FLAG_ACTIVITY_NO_HISTORY
).Exception or Error
N/A
Expected Behaviour
I'm not a Android dev, so I'm not sure what's going on, but I've seen other flutter app (like the Philips Hue app), doing this correctly. You can see when starting the login flow, that the custom tab is not launched separately. You can also put the app in the background and go back to the app and see that the custom tab is still there. If you go back after a successfull login, the custom tab doesn't reappear
Screenshots
The custom tab shown in another "task/activity"

Additional context
No response
Device
Pixel 6
OS
Android
Browser
N/A
Flutter version
3.29.0
flutter_web_auth_2 version
4.1.0
Checklist
The text was updated successfully, but these errors were encountered: