Bluetooth
bluetooth.isEnabled()
Syntax
var enabled = bluetooth.isEnabled();
Return value
A Boolean with the enabled status of bluetooth
bluetooth.setEnabled()
Syntax
bluetooth.setEnabled(enabled);
Parameters
enabled: A Boolean to set bluetooth enabled status
bluetooth.connectedDevices()
Syntax
var devices = bluetooth.connectedDevices();
Return value
A Array filled with bluetooth device id Strings
bluetooth.pairedDevices()
Syntax
var devices = bluetooth.pairedDevices();
Return value
A Array filled with bluetooth device id Strings
Bluetooth Device
bluetoothDevice.name()
Syntax
var name = bluetoothDevice.name(id);
Parameters
id: A String representing a bluetooth device id
Return value
A String with the name of the bluetooth device
bluetoothDevice.address()
Syntax
var address = bluetoothDevice.address(id);
Parameters
id: A String representing a bluetooth device id
Return value
A String representing the device address
bluetoothDevice.paired()
Syntax
var paired = bluetoothDevice.paired(id);
Parameters
id: A String representing a bluetooth device id
Return value
A Boolean representing whether the device is paired or not
bluetoothDevice.unpair()
Syntax
bluetoothDevice.unpair(id);
Parameters
id: A String representing a bluetooth device id