Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
iOSDevice.BatteryLevel
The battery charge level for the device.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
iOSDevice | 7.2 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "iOSDevice.BatteryLevel" )
Parameters
none
Result
Returns value or error.
Description
The battery charge level for the device.Battery level ranges from 0.0 (fully discharged) to 1.0 (100% charged). Before accessing this property, ensure that battery monitoring is enabled.
If battery monitoring is not enabled, battery state is Unknown and the value of this property is –1.0.
Examples
Show battery level:
Show Custom Dialog [ "Battery Level" ; MBS( "iOSDevice.BatteryLevel" ) ]
See also
This function is free to use.
Created 18th March 2017, last changed 25th November 2017
