sumup-android-sdk: Terminal getting stuck with bluetooth connection
We are having issues with the terminal getting stuck with the bluetooth connection. We think the issue might be that when calling checkout your SDK goes in forground and stops the main activity (our app) and therefore the thread will be dead and can’t get notified.
Even your sample app has the same issue.
07-24 11:10:06.426 4023-12130/com.nuvopoint.tillty E/SumUp: (SourceFile:150)@BtSmart-Receiver | onTransportError() PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.267 4023-12130/com.nuvopoint.tillty E/SumUp: (SourceFile:150)@BtSmart-Receiver | onTransportError() PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.272 4023-4023/com.nuvopoint.tillty E/SumUp: (SourceFile:759)@main | Reader error received: PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.347 4023-8335/com.nuvopoint.tillty W/MessageQueue: Handler (android.os.Handler) {a8ce003} sending message to a Handler on a dead thread
java.lang.IllegalStateException: Handler (android.os.Handler) {a8ce003} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:545)
at android.os.Handler.enqueueMessage(Handler.java:661)
at android.os.Handler.sendMessageAtTime(Handler.java:630)
at android.os.Handler.sendMessageDelayed(Handler.java:600)
at android.os.Handler.sendMessage(Handler.java:537)
at android.os.Message.sendToTarget(Message.java:418)
at com.sumup.readerlib.pinplus.transport.BtSmartReceiver.onConnectionStateChange(SourceFile:66)
at android.bluetooth.BluetoothGatt$1$4.run(BluetoothGatt.java:268)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:789)
at android.bluetooth.BluetoothGatt.-wrap0(Unknown Source:0)
at android.bluetooth.BluetoothGatt$1.onClientConnectionState(BluetoothGatt.java:264)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:70)
at android.os.Binder.execTransact(Binder.java:682)
This stackoverflow question outlines the problem, along with a potential answer: https://stackoverflow.com/questions/8040280/how-to-handle-handler-messages-when-activity-fragment-is-paused
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 4
- Comments: 17 (7 by maintainers)
Thanks for the update, and sorry for the delay in that thread. Indeed, SDK 3.1.0 was released end of last week, aiming at solving the issue.
Thanks for the feedback.
The warning is not the issue here. Still, we agree it is unnecessary noise and it will be fixed in the next sdk version.
Regarding the issue, we identified it internally. It will be part of the next SDK release as well.