evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

android: onConnectionState change is not handled correctly #157

Open glennra opened 5 years ago

glennra commented 5 years ago

The status parameter is used to check if a connection was successful but the newState parameter should be checked for the connection state. Also there is no propagation of other statuses such as "disconnected by device".

glennra commented 5 years ago

Possible fix here: https://github.com/tijmenvangulik/cordova-ble/commit/b802262619711f5bffc2ebcaf0d3037f9d6ddd81