stripe / stripe-terminal-android

Stripe Terminal Android SDK
https://stripe.dev/stripe-terminal-android/
Other
86 stars 45 forks source link

User-Initiated Tap to Pay Reader disconnect triggers 'onUnexpectedReaderDisconnect' event #306

Closed choang10 closed 1 year ago

choang10 commented 1 year ago

Summary

After successfully connecting to a local mobile reader, calling Terminal.getInstance().disconnectReader() triggers the 'onUnexpectedReaderDisconnect' event, causing the TerminalListener method to be called. I've tested on the same physical device using the simulated BT card reader, and calling the disconnectReader() method doesn't trigger that event (it does still trigger the 'onConnectionStatusChange' and 'onPaymentStatusChange' events).

Code to reproduce

Android version

13

Impacted devices (Android devices or readers)

Google Pixel 4A

SDK version

implementation "com.stripe:stripeterminal-localmobile:2.18.0-b0" implementation "com.stripe:stripeterminal-core:2.18.1"

Other information

It might be worth noting that this project is built using Nativescript with generated TS typings, though it hasn't impacted any other areas of our SDK implementation.

jronnen7 commented 1 year ago

I am having this issue too. It only happens when we disconnect from COTS device on android.

Android version

13

Impacted devices (Android devices or readers)

Google Pixel 7

SDK version

implementation "com.stripe:stripeterminal-localmobile:2.20.1" implementation "com.stripe:stripeterminal-core:2.20.1"

Other Information

IOS terminal sdk doesn't throw the unexpected disconnect event

maggiewhite-stripe commented 1 year ago

@choang10 This issue was fixed in the 2.21.1 release - please re-open this ticket if you still see this problem in the 2.21.1 release or newer.