Adyen / adyen-react-native

Adyen React Native
https://docs.adyen.com/checkout
MIT License
44 stars 32 forks source link

Android can't resume activity when launching from app-icon in launcher #354

Closed StefanWallin closed 8 months ago

StefanWallin commented 8 months ago

Describe the bug Almost all bank customers in Sweden have to do a 3DS-OOB-verification through another Native App called BankID. When switching to that app and coming back, not all issuers support redirectUri, so that has to be done manually.

To go back to our app, some of our Android-users use the app launcher and press our app-icon to resume the payment and submit additional details. This results in our app staying on the same screen(somehow magically through react-navigation I presume), but the Adyen Drop-In Component has now destroyed it's session so we never get any getAdditionalDetails-callback and the offer session is lost.

To Reproduce Steps to reproduce the behavior:

  1. Open Drop-In component
  2. Enter details for 3DS-required-card
  3. Minimize the app
  4. Resume app from app-launcher (not app switcher)

Expected behavior If we swap point 4 above with "Resume app from app swithcer", then the adyen drop-in component is still visible. When starting the app from appIcon I expect to have the same behaviour that the drop-in component is still active

Screenshots .mov Screenrecording: https://github.com/Adyen/adyen-react-native/assets/457653/0ded4e53-d7fc-4d45-a2b2-b8e7b788a952

Smartphone (please complete the following information):

Additional context adyen-react-native: 1.2.0

StefanWallin commented 8 months ago

A potential workaround would be for us to store data from our api-request in the onSubmit-callback in local storage, then on component rerender upon activity restart, check for that data and somehow be able to call nativeComponent.handle(data), but we don't have access to nativeComponent in that scope.

To be able to do that we would need to be able to check if the adyen drop-in component is active so as to not trigger multiple nativeComponent.handle(data).

Thanks in advance and please advice on sane ways forward.

descorp commented 8 months ago

Hey @StefanWallin

This is known issue. I would suggest to continue discussion in original topic.