react-native-plaid-link-sdk icon indicating copy to clipboard operation
react-native-plaid-link-sdk copied to clipboard

Android - backHandler support

Open iamandiradu opened this issue 4 years ago • 8 comments

On Android, pressing the 'back' button will close Plaid instead of navigating back. Is there a way to prevent this? Adding the BackHandler bypass on the root screen doesn't work. This needs to be handled inside of Plaid component.

iamandiradu avatar Apr 19 '21 12:04 iamandiradu

Thanks for reporting @iamandiradu.

Unfortunately, our SDK doesn't offer a way to modify the back behavior and pressing back currently closes Plaid Link. This however is on our roadmap, so please stay up to date with our SDK so you'll get it as soon as we roll out this feature.

JeroenMols avatar Apr 20 '21 13:04 JeroenMols

I might be able to add this feature. If so, expect a PR. :)

iamandiradu avatar Apr 20 '21 14:04 iamandiradu

Thank you for offering that's super kind!

We do accept PRs for React Native, but not for the Android/iOS SDKs that are wrapped by RN unfortunately. At the moment it's also challenging to properly to support this (given that we render Plaid Link in a Webview), but we will soon be changing that which would enable us to provide proper back support.

JeroenMols avatar Apr 20 '21 14:04 JeroenMols

Can this be left open? It's a production bug. Not only does the SDK close upon Back pressed, there are zero events fired as a result, meaning we have no way to react to it happening.

a613 avatar Apr 20 '21 15:04 a613

@a613, the onExit event is not fired? I'm currently using it to open a form when the user closed Plaid and it works. It works in both scenarios: X button or back button.

iamandiradu avatar Apr 20 '21 15:04 iamandiradu

Oh I was using the webview directly there, and saw no events at all. But after turning the SDK on, yes I do get an onExit, and it seems to only have metadata.linkSessionId in it, unlike the more filled-out event payloads if the user uses the Plaid UI to exit. That should let us differentiate between a normal exit and a Back-button exit.

Still a prod bug, and would prefer if it was left open to reflect that. @JeroenMols

a613 avatar Apr 20 '21 16:04 a613

@a613 good point, sorry for the eager close.

Let's keep this open to track the progress.

JeroenMols avatar Apr 21 '21 07:04 JeroenMols

Hi, our native beta does support a more nuance back behavior. Please contact [email protected] with your client_id in order to enable this feature.

amytang0 avatar Dec 13 '21 21:12 amytang0