Bluetooth is a native extension to communicate using the Bluetooth interface on the device. It provides access to the Bluetooth interface, being able to power it on and off. It has the ability to scan for available devices and make the device discoverable by listening for connections.

It’s also possible to initiate a connection to another Bluetooth device. The extension allows an application to transmit any sort and amount of data as a ByteArray.

Sample

public function cancelScan():Boolean;
public function close(uuid:String, secure:Boolean = true):Boolean;
public function closeAll():Boolean;
public function connect(device:BluetoothDevice, uuid:String, secure:Boolean = true):Boolean;
public function disable():Boolean;
public function disconnect(device:BluetoothDevice, uuid:String):Boolean;
public function enable():Boolean;
public function enableWithUI():Boolean;
public function getPairedDevices():Vector;
public function getScanMode():String;
public function getState():String;
public function init(developerKey:String):void;
public function isDiscoverable():Boolean;
public function isEnabled():Boolean;
public function listen(uuid:String, secure:Boolean = true):Boolean;
public function readBytes(uuid:String):ByteArray;
public function setDeviceDiscoverable(discoverable:Boolean = true, seconds:int = 60):Boolean;
public function showSettings():Boolean;
public function startScan():Boolean;
public function writeBytes(uuid:String, data:ByteArray):Boolean;
Air Native Extension, Android . URL.