-
Notifications
You must be signed in to change notification settings - Fork 658
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
Fix browser redirect on firefox browser. #4046
Conversation
…lears the activities up until the StripeBrowserLauncher. Attempt to fix 3952
Diffuse output:
APK
MANIFEST
|
Were you able to verify the behavior with Custom Tabs and without custom tabs across different browsers? From https://inthecheesefactory.com/blog/understand-android-activity-launchmode/en, "This mode is rarely used.". I wonder if there are any negative tradeoffs from using this mode? |
I am testing this with Opera, Firefox, and Chrome browsers. With singleTop it only works with Chrome and Opera. With singleTask and singleInstance it works with Firefox, Chrome, and Opera. |
Are there additional browsers you think would be worth testing with? |
Just wanted to check on your intent of launchMode: singleTop (the original). Was your hope to destroy the activities above StripeBrowserLauncherActivity? In this case either singleTask or singleInstance would both work. |
Is this also true for Custom Tabs vs not? I think this change is fine, I was mainly wondering if there are any tradeoffs. Also sounds like |
yep! singleTask works for chrome tabs as well. |
@@ -32,7 +32,7 @@ | |||
<activity | |||
android:name=".payments.StripeBrowserLauncherActivity" | |||
android:theme="@style/StripeTransparentTheme" | |||
android:launchMode="singleTop" | |||
android:launchMode="singleTask" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to singleTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be in this PR, but would be nice to add a comment as to why this is necessary.
Summary
Make the StripeBrowserLauncherActivity a single instance so that it clears the activities up until the StripeBrowserLauncher. After this change the redirect will now work on the firefox mobile browser.
I found this similar issue: https://stackoverflow.com/questions/55077642/android-deep-link-firefox-like-chrome
For us the concern about the extras is less relevant because in our code base onResult is called which just calls finish (it also then calls onNewIntent). It does not use the extras.
Attempt to fix #3952
Testing