Commit df2f98ea authored by Anon's avatar Anon
Browse files

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(
......
Supports Markdown
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