Back
GetBatteryLevel
Hello World
Returns the current battery level of the device in percent.
app.GetBatteryLevel() →
Number:
percent
See Also:
GetChargeType
,
IsCharging
Example - Show Battery Level
function
OnStart
(
)
{
var
lvl
=
app
.
GetBatteryLevel
(
)
;
app
.
Alert
(
lvl
)
;
}
Copy
Copy All
Run