Skip to content
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

[FC] Gracefully fail when no browsers available #6794

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented May 29, 2023

Summary

  • Issue: Financial Connections fails with NoActivityFound to handle intent when trying to open a web browser an there's none installed on the device.
  • Solution: Close the flow with a Fail callback notifying the developer, and a toast notifying the user.
    • This solution applies for both native and web flows.

Motivation

📔  [Android] Gracefully fail when no browsers available
🌐  BANKCON-7021

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

toast.webm

Changelog

- [Fixed] Gracefully fail when no browsers available.

@carlosmuvi-stripe carlosmuvi-stripe added the work-cli Added to pull requests created with #work-cli for usage tracking. label May 29, 2023
@carlosmuvi-stripe carlosmuvi-stripe self-assigned this May 29, 2023
@carlosmuvi-stripe carlosmuvi-stripe changed the title [Android] Gracefully fail when no browsers available [FC] Gracefully fail when no browsers available May 29, 2023
@carlosmuvi-stripe carlosmuvi-stripe added the financial-connections Relates to the Financial Connections SDK label May 29, 2023
Comment on lines -154 to -162
class ClickLinkAnotherAccount(
pane: Pane,
) : FinancialConnectionsEvent(
name = "click.link_another_account",
mapOf(
"pane" to pane.value,
).filterNotNullValues()
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated - unused event (this button does not exist anymore)

@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review May 29, 2023 23:24
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners May 29, 2023 23:24
vardges-stripe
vardges-stripe previously approved these changes May 31, 2023
Copy link
Contributor

@vardges-stripe vardges-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYSM

…7021/android-gracefully-fail-when-no-browsers-available

# Conflicts:
#	CHANGELOG.md
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/BANKCON-7021/android-gracefully-fail-when-no-browsers-available branch from c0ed775 to 212616f Compare June 1, 2023 22:35
@@ -0,0 +1,17 @@
package com.stripe.android.financialconnections.exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlosmuvi-stripe carlosmuvi-stripe merged commit 9a0ebcf into master Jun 2, 2023
@carlosmuvi-stripe carlosmuvi-stripe deleted the carlosmuvi/BANKCON-7021/android-gracefully-fail-when-no-browsers-available branch June 2, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
financial-connections Relates to the Financial Connections SDK work-cli Added to pull requests created with #work-cli for usage tracking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants