mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-22 00:06:48 +02:00
Sleep a short while before discovering services
Let us see if this improves #252.
This commit is contained in:
@@ -530,6 +530,13 @@ public abstract class BluetoothCommunication {
|
|||||||
|
|
||||||
connectionEstablished = true;
|
connectionEstablished = true;
|
||||||
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_ESTABLISHED);
|
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_ESTABLISHED);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Thread.sleep(200);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
// Empty
|
||||||
|
}
|
||||||
gatt.discoverServices();
|
gatt.discoverServices();
|
||||||
}
|
}
|
||||||
else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
|
else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
|
||||||
|
Reference in New Issue
Block a user