Interpreting "No Battery" for Android Devices
Summary
Related SOTI ONE Platform Products
Related Device OS
Situation
- In some cases, when No Battery is displayed for Battery Percentage on Android Devices, the battery is attached to the device.
- No Battery is generally used for Desktop Devices such as Windows Desktop, iMac and several Linux Desktops.
- Customers may ask why the Android device displays the No Battery status
- Customers may ask if SOTI MobiControl can determine the Battery Percentage via Android Device Agent.
Environment
Android Device Agent
Process Description
The No Battery status is reserved for when the device has no battery for Desktop OS devices, or when the charging status cannot be determined on mobile devices.
On an Android device, you can confirm it by sending a JavaScript script.
1. Select Device Information and then from the More menu, select Send Script.
2. For Script Type, choose JavaScript and then select Send Script. See Android Agent JavaScript for more:
var usage = mobicontrol.battery.level;
if ( usage > 1 ) {
mobicontrol.log.info('Over 100%: ' + usage*100 + '%');
} else if (usage > 0) {
mobicontrol.log.info('Over 0%: ' + usage*100 + '%');
} else if (usage == 0) {
mobicontrol.log.info('0%: ' + usage*100 + '%');
} else {
mobicontrol.log.info('Unknown: ' + usage);
}
3. From the device's Logs tab, see the output.
Note: This script returns Unknown in the two following situations:
- The device has no battery.
- The charging status cannot be determined.
Was this helpful?
Thanks for your feedback