Back

IsBluetoothEnabled

Hello World

Return whether bluetooth was enabled.

app.IsBluetoothEnabled() → boolean

See Also: SetBluetoothEnabled

Example - Check Bluetooth Status

function OnStart()
{
    var status = app.IsBluetoothEnabled()
    var state = app.IsBluetoothOn();

    app.ShowPopup(
        "Bluetooth is " +
        (status ? "enabled" : "disabled") +
        (status == state ? " and " : " but ") +
        (state ? "on" : "off")
    );
}
    Copy     Copy All       Run