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

Update example app to use two activities #1497

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 12, 2023

  1. Update example app to use two activities

    Using singleTask in an Android application for the activity that has an
    intent-filter on the LAUNCHER, means that any activities running on top
    of this activity will disappear when the app's icon is pressed again
    from the launcher.
    
    This is a problem, because when confirming a SetupIntent or
    PaymentIntent, Stripe may need to present a web browser (its own
    activity) for verification with a customer's bank or similar, and the
    user may even need to leave this web browser activity temporarily to
    navigate to their bank's own application. If the user is not careful
    when navigating back to the original app, and taps the app's icon from
    the launcher, the app will open to its original activity, and the web
    browser is gone. Instead, the user will need to navigate back only using
    Android's app switcher, which will correctly bring you back into the
    open web browser activity.
    
    The change in this commit side-steps this issue by splitting the example
    application into two acitivites. One that is only responsible for
    launching the application, and a second activity that actually
    represents the react native application, and will be started by the
    first activity, ensuring to only start it once.
    
    This fixes stripe#355.
    stianjensen committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    d40cc74 View commit details
    Browse the repository at this point in the history