mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-03 04:56:27 +02:00
When miband2 auth success, let application show miband status is connected
This commit is contained in:
parent
08f2b0eb7c
commit
19fbe5719c
@ -112,13 +112,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
||||
byte[] response = intent.getExtras().getByteArray(DeviceService.EXTRA_MIBAND2_AUTH_BYTE);
|
||||
BluetoothGattCharacteristic temp = getCharacteristic(MiBand2Service.UUID_UNKNOWN_CHARACTERISTIC9);
|
||||
temp.setValue(response);
|
||||
if ((temp.getProperties() & (BluetoothGattCharacteristic.PROPERTY_WRITE | BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE)) != 0) {
|
||||
Log.d("HELLO", "its looks ok");
|
||||
}
|
||||
if (!mBluetoothGatt.writeCharacteristic(temp)) {
|
||||
Log.d("ERROR", "ERROR");
|
||||
}
|
||||
Log.d("HELLO", "HELLO");
|
||||
mBluetoothGatt.writeCharacteristic(temp);
|
||||
|
||||
}
|
||||
}
|
||||
@ -173,7 +167,8 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
||||
// this is apparently not needed anymore, and actually causes problems when bonding is not used/does not work
|
||||
// so we simply not use the UUID_PAIR characteristic.
|
||||
// .pair(builder)
|
||||
.testInit(builder);
|
||||
.testInit(builder)
|
||||
.setInitialized(builder);
|
||||
//.requestDeviceInfo(builder)
|
||||
//.requestBatteryInfo(builder);
|
||||
// .sendUserInfo(builder)
|
||||
|
Loading…
Reference in New Issue
Block a user