Back

GetChargeType

Hello World

Returns the current charge type.

app.GetChargeType() → string: “AC” or “USB” or “Wireless” or “None”

If the device isn't charging the result is “None”.

See Also: GetBatteryLevel, IsCharging

Example - Show Charge Type

function OnStart()
{
    var type = app.GetChargeType();
    app.Alert( type );
}
    Copy     Copy All       Run