Change the device’s “Battery Charging profile” to “Battery Lifetime” by Using the Datalogic SDK in a Custom app:
The Datalogic SDKs provides the DLBatteryManager
and ChargingProfile
classes to manage the battery charging profile.
This is a Java example on how to use those classes:
ChargingProfile chprof = ChargingProfile.CHARGING_PROFILE_LIFETIME
DLBatteryManager bm = DLBatteryManager.getInstance();
//check if the profile is supported
for (ChargingProfile chprof : bm.getSupportedChargingProfiles()) {
if (chprof.getId() == profile) {
bm.setCurrentChargingProfile(chprof);
Log.i(TAG, “applied battery profile “ + chprof.getName());
break;
}
}
See also :
Datalogic SDK | DLBatteryManager class