Do something when we receive a CharacteristicChanged message
on the UUID_CHARACTERISTIC_BATTERY characteristic. This is a first try at addressing #71 Please note that this will probably not work at this point, but it's worth a try. To make it work probably we have to tell the device to send updates, and we don't know how to do it.
This commit is contained in:
parent
ea43d76705
commit
cb3be26349
|
@ -415,7 +415,9 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
|||
UUID characteristicUUID = characteristic.getUuid();
|
||||
if (MiBandService.UUID_CHARACTERISTIC_ACTIVITY_DATA.equals(characteristicUUID)) {
|
||||
handleActivityNotif(characteristic.getValue());
|
||||
}
|
||||
} else if (MiBandService.UUID_CHARACTERISTIC_BATTERY.equals(characteristicUUID)) {
|
||||
handleBatteryInfo(characteristic.getValue(), BluetoothGatt.GATT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -641,4 +643,4 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
|||
protected TransactionBuilder createTransactionBuilder(String taskName) {
|
||||
return new MiBandTransactionBuilder(taskName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue