NordicSemiconductor / Android-nRF-Toolbox

The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Toolbox
BSD 3-Clause "New" or "Revised" License
1.07k stars 461 forks source link

Failed connection has no callback #32

Closed philips77 closed 7 years ago

philips77 commented 7 years ago

After calling connect(BluetoothDevice) in BleManager class the Android starts to connect. However, if for some reason the connection fail to be established (error 133, or 8 (timeout)) there is no any callback to the app. The onDeviceDisconnected is not called as the device wasn't connected, the onError is also not called as the new state is STATE_DISCONNECTED. See here: https://github.com/NordicSemiconductor/Android-nRF-Toolbox/blob/f3cd55a756358af8627af5fd2b42a1837b9d5fa5/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/BleManager.java#L1187