11
kshep92
8y

How modern smartphone OSs (Android) deal with battery charge.

// handler for when the battery level changes
public void onLevelChange (BatteryInfo info) {
if(info.batteryLevel() < 99) Device.getBattery().drainAllCharge()
}

Comments
Add Comment