Skip to content
Snippets Groups Projects
Commit df2f98ea authored by Anon's avatar Anon
Browse files

ConnectionService: Fix duplicate callbacks.

parent beb5b224
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment