Interpreting "No Battery" for Android Devices

Publish Date: 05-Jun-2024 Last Modified Date: 27-Aug-2025 SOTI MobiControl
2059 0

Summary

Verify if 'Battery Percentage' cannot be determined or if the battery is not attached to an Android device when a 'No Battery' message is displayed.

Related SOTI ONE Platform Products

SOTI MobiControl

Related Device OS

Android Classic;Android Enterprise

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.

Battery Percentage shows No Battery 

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.

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);
}

The Send Script panel with script entered

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.

Viewing the device logs

Was this helpful?