Commit df2f98ea authored by Anon's avatar Anon

ConnectionService: Fix duplicate callbacks.

parent beb5b224
......@@ -65,6 +65,11 @@ object ConnectionService {
}
fun connect(context: Context) {
if (isConnected()) {
gattListeners.values.map { it.onConnectionReady() }
return
}
// Use first BLE devices that is bonded
val bondedDevices = BluetoothAdapter.getDefaultAdapter().bondedDevices.filter {
it.address.startsWith(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment