mobicontrol.battery

This namespace provides access to the device's battery functionality.
Since:
  • Version 1.0 (API level 1)

Members

static, readonly, nullable isCharging :boolean

Battery charging status.

If the battery is currently charging, the status is true, otherwise it is false.
This property is null if the device has no battery or if the charging status cannot be determined.

Since:
  • Version 1.0 (API level 1)

static, readonly, nullable level :number

The current battery level, from 0 to 1.

0 means the battery is fully depleted, 1 means the battery is full, values between 0 and 1 mean the battery is partially charged. For example, 0.75 means that the battery is 75% charged.

This property is null if the device has no battery or if the battery level cannot be determined.

Since:
  • Version 1.0 (API level 1)
Example
if (mobicontrol.battery.level >= 0.75) {
    mobicontrol.app.install('/data/example.apk');
}

static, readonly, nullable temperature :number

The current battery temperature, in degrees Celsius.

This property is null if the device has no battery or if the battery temperature cannot be determined.

Since:
  • Version 1.7 (API level 8)

static, readonly, nullable voltage :number

The current battery voltage, in volts.

This property is null if the device has no battery or if the battery voltage cannot be determined.

Since:
  • Version 1.7 (API level 8)