capacitor-stripe-terminal icon indicating copy to clipboard operation
capacitor-stripe-terminal copied to clipboard

sdk says no terminal is connected, yet if you turn off the terminal, it fires the onUnexpectedReaderDisconnect event

Open scottwilson312 opened this issue 2 years ago • 1 comments

On Android.

If I'm connected to the reader, then rebuild the app in android studio, then call getConnectedReader, it returns null.

However if I try to call discoverReaders, it doesn't find anything

If I restart the terminal with a paperclip, then the onUnexpectedReaderDisconnect fires. At this point, discoverReaders can find the terminal.

How is it possible that getConnectedReader returns null, yet powering down the reader fires onUnexpectedReaderDisconnect. Surely if there is no connected reader, then it doesn't make sense that one can be disconnected!

Thanks for this library by the way. It's great!

scottwilson312 avatar Jan 28 '23 19:01 scottwilson312

That is strange behavior 🤔

To be clear, you connected to a reader and then restarted the app via Android Studio, correct?

nprail avatar Feb 28 '23 19:02 nprail