Bluetooth-Library icon indicating copy to clipboard operation
Bluetooth-Library copied to clipboard

Cannot connect after close an activity and reopen again.

Open tomeroto opened this issue 3 years ago • 1 comments

I try reopen activity and connect BT, but it was error:

08-02 07:03:45.892 24983-24992/com.test.bt E/System: Uncaught exception thrown by finalizer
08-02 07:03:45.892 24983-24992/com.test.bt E/System: java.io.IOException: socket not created
        at android.net.LocalSocketImpl.shutdownInput(LocalSocketImpl.java:396)
        at android.net.LocalSocket.shutdownInput(LocalSocket.java:206)
        at android.bluetooth.BluetoothSocket.close(BluetoothSocket.java:582)
        at android.bluetooth.BluetoothSocket.finalize(BluetoothSocket.java:277)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:228)
        at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:206)
        at java.lang.Thread.run(Thread.java:818)

I must destroy app (not just activity) and reopen app again and launch activity and then it normal. But if i close activity and reopen again it will error.

And also how to stop stream from this libs?

tomeroto avatar Aug 02 '20 00:08 tomeroto

Hi. Can you post the code you used ?

omaraflak avatar Aug 02 '20 07:08 omaraflak