Back

GetBtProfileState

Hello World

Returns the Bluetooth State of a given Bt connection type.

app.GetBtProfileState( type ) → string: “Connected” or “Disconnected”

See Also: CreateBluetoothSerial

Example - Show Bluetooth Profile State

function OnStart()
{
    var states = "a2dp|headset|gatt|health".split( "|" );
    var lst = [];

    for( var i in states )
    {
        var state = app.GetBtProfileState( states[i] );
        lst.push( states[i] + + ": " + state);
    }

    app.Alert( lst.join( "\n" ) );
}
    Copy     Copy All       Run      
string: “a2dp” or “headset” or “gatt” or “health”