Closed choang10 closed 1 year ago
I am having this issue too. It only happens when we disconnect from COTS device on android.
13
Google Pixel 7
implementation "com.stripe:stripeterminal-localmobile:2.20.1" implementation "com.stripe:stripeterminal-core:2.20.1"
IOS terminal sdk doesn't throw the unexpected disconnect event
@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.
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.