This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
IsCharging
JS
Py
Hello World
Checks if phone is currently charging or not.
app.IsCharging() →
Boolean
See Also:
GetBatteryLevel
,
GetChargeType
Example - Check Charging State
click to expand contents
function
OnStart
(
)
{
var
charging
=
app
.
IsCharging
(
)
;
app
.
Alert
(
charging
,
"is charging:"
)
;
}
from
native
import
app
def
OnStart
(
)
:
charging
=
app
.
IsCharging
(
)
app
.
Alert
(
charging
,
"is charging:"
)
Copy
Copy All
Run
loading