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
Object: { COMMAND }
function( name, address )
btl.Batch
Batch method calls to be able to set all object's properties at once.
Note that you need to specify each parameter (use “” or null to leave some out)
Inherited methods can be called by appending an underscore to the function name (ie. txt.Batch({ SetBackColor_: [“red”] })
btl.GetType
Returns the control class name.
btl.SetOnTouch
Define a callback function that is called when the user selects an element.