-
Notifications
You must be signed in to change notification settings - Fork 640
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
Support for ActivityResultContract #2640
Comments
@twobeeronebread thanks for filing and for your helpful suggestions. This is definitely something on our radar and something we've begun discussing internally. We'll keep you posted here on any updates. |
Sounds good, i was looking into the stripe source code to add support but it did seem like a few refactoring are needed to properly expose the intent. Thanks for getting back so quick! |
@twobeeronebread btw we'll hold off on supporting this until the API is in release. |
That makes sense. I forgot that we are using the alpha version of androidx.activity:activity |
@twobeeronebread thanks for filing. This is on our roadmap and we'll update this ticket when we have an update. Closing for now. |
Do you have an updates related to this issue? |
Any update on this issue team? |
Maybe if more persons are asking for this, it will come to an end. Thank you, |
@Flo354 @UmairKhalid786 @awfasano @twobeeronebread Take a look at our new PaymentLauncher described here and see if this addresses your need. This interface will take a callback and internally we will use the registerForActivityResult. Also note there is a compose interface cc: @ccen-stripe |
Thank you. Why does it returns a |
Hi @Flo354 , the |
Hmmm, I will stay on the deprecated method, too much changes, too much things to do in addition, just for a warning. The register of the activity result must be done before the activity is actually started, but I get the stripe account id after, when I create the payment intent server side (because I am processing payments on behalf of standard connected accounts). Thank you for your response, though. |
Summary
With onActivityResult being deprecated and it being suggested to use registerForActivityResult I am hoping that the sdk can add support for this. A simple example can be found here: https://developer.android.com/training/basics/intents/result#custom
Code to reproduce
This is particular important when calling handleNextActionForPayment or any of the other methods that will require to use onActivityResult
Possible solution
An easy solution could be to expose the intent somehow via the handleNextActonPayment, or have a seperate method that returns the ActivityResultContract that then can be used to start the activity instead of how it currently works.
I am happy to add some more details if required or even attempt to fix this with some guidance and what the stripe engineers would like to see as a good approach.
The text was updated successfully, but these errors were encountered: