Battery logging added

This commit is contained in:
Aleksander Nowakowski
2018-04-24 23:16:07 +02:00
parent b4802e1684
commit 0e2887ab24

View File

@@ -48,6 +48,7 @@ public abstract class BatteryManager<T extends BatteryManagerCallbacks> extends
.with(new BatteryLevelDataCallback() {
@Override
public void onBatteryLevelChanged(@NonNull final BluetoothDevice device, final int batteryLevel) {
log(LogContract.Log.Level.APPLICATION,"Battery Level received: " + batteryLevel + "%");
mBatteryLevel = batteryLevel;
mCallbacks.onBatteryLevelChanged(device, batteryLevel);
}
@@ -83,7 +84,7 @@ public abstract class BatteryManager<T extends BatteryManagerCallbacks> extends
}
/**
*
* Disables Battery Level notifications on the Server.
*/
public void disableBatteryLevelCharacteristicNotifications() {
if (isConnected()) {