Back

CreateBluetoothList

Hello World
Content:
- Methods

CreateBluetoothList shows an Android dialog which allows the user to select a Bluetooth device from paired and discovered devices.

btl = app.CreateBluetoothList( filter ) → app object: BluetoothList

See Also: GetPairedBtDevices, DiscoverBtDevices.

Example - Basic

function OnStart()
{
    lst = app.CreateBluetoothList();
    lst.SetOnTouch( OnBtList );
}

function OnBtList(name, address)
{
    app.Alert("Name: " + name + "\nAddress: " + address, "Result");
}
Copy All       Run      

Methods

The following methods are available on the BluetoothList object:

GetType() → string: “BluetoothList”
string
function( name, address )
btl.GetType
Returns the control class name.
btl.SetOnTouch
Define a callback function that is called when the user selects an element.