flutter_bluetooth_basic icon indicating copy to clipboard operation
flutter_bluetooth_basic copied to clipboard

State listen event not firing

Open andydean565 opened this issue 5 years ago • 0 comments

cant get the listen event to fire for the Bluetooth state, tried it on my own project but after trying for a while downloaded the example and get the same issue.

if I run the following after trying to connect to a device it does show that iv been connected but no event from the listener.

` bool isConnected = await bluetoothManager.isConnected;

this is coming up in the console:

W/BluetoothAdapter(13938): getBluetoothService() called with no BluetoothManagerCallback W/System.err(13938): java.io.IOException: read failed, socket might closed or timeout, read ret: -1 W/System.err(13938): at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:796) W/System.err(13938): at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:810) W/System.err(13938): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:416) W/System.err(13938): at com.gprinter.io.BluetoothPort.openPort(BluetoothPort.java:58) W/System.err(13938): at com.tablemi.flutter_bluetooth_basic.DeviceConnFactoryManager.openPort(DeviceConnFactoryManager.java:156) W/System.err(13938): at com.tablemi.flutter_bluetooth_basic.FlutterBluetoothBasicPlugin$3.run(FlutterBluetoothBasicPlugin.java:233) W/System.err(13938): at com.tablemi.flutter_bluetooth_basic.ThreadPool$1.run(ThreadPool.java:78) W/System.err(13938): at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187) W/System.err(13938): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) W/System.err(13938): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) W/System.err(13938): at java.lang.Thread.run(Thread.java:784)

andydean565 avatar Mar 15 '20 20:03 andydean565