harryjph / android-bluetooth-serial

A library for Android to simplify basic serial communication over Bluetooth, for example when communicating with Arduinos.
Apache License 2.0
176 stars 60 forks source link

BluetoothManager does not remove closed devices #3

Closed mlhw closed 5 years ago

mlhw commented 5 years ago

The BluetoothManager closeDevice(String mac) { ... } removes the closed device from the bluetooth managers device list.

Calling close() on the BluetoothManager closes the device but does not remove it from the device list.

Trying to reconnect to a previously connected device will result in the BluetoothManager finding a closed device and the BluetoothSerialDevice to throw IllegalArgumentException since requireNotClosed() will fail.

harryjph commented 5 years ago

Thanks for reporting, I will investigate.

harryjph commented 5 years ago

https://github.com/harry1453/android-bluetooth-serial/releases/v1.1.1 please check, this should work as you expect.