I am a little confused about how to read the battery level of an Android device. I am able to get the BluetoothGattCharacteristic
for the battery level just fine, but the results seem very odd.
I'm basically doing the following:
int batteryLevel = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 0);
And that returns a value of 57. Which would seem fine, but when I test using other bluetooth apps like the BLE Scanner by Bluepixel, that app always reports a value somewhere around 17%.
What could I be doing wrong that would give me such a different number?