Returns the Bluetooth State of a given Bt connection type.
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" ) );
}
from native import app
def OnStart():
states = ["a2dp", "headset", "gatt", "health"]
lst = []
for state in states:
state_value = app.GetBtProfileState(state)
lst.append(state + ": " + str(state_value))
app.Alert('\n'.join(lst))