Interface IBluetoothAdapter2
interface IBluetoothAdapter2
Extends IBluetoothAdapter
Methods
getSerial()
Provides access to Bluetooth Serial capabilities (for example, RFCOMM).ISerial*getSerial()
Returns
ISerial*
Returns pointer to the ISerial interface.
Throws
OutOfMemoryError— if make an instance of IDiscoverySettingsbuilder failed.BluetoothUnsupported— if feature is not supported.
getConnectedDevices()
Returns list of connected devices.IDevice*[]getConnectedDevices()
Returns
IDevice*[]
Returns an array of IDevice. If no device is connected, array is empty.
Throws
OutOfMemoryError— if not enough memory is available to create the list of devices.
getPairedDevices()
Returns list of paired devices.IDevice*[]getPairedDevices()
Returns
IDevice*[]
Returns an array of IDevice. If no device is connected, array is empty.
Throws
OutOfMemoryError— if not enough memory is available to create the list of devices.
getDeviceByAddress()
Returns a device from its MAC address. The device must be known (paired).IDevice*getDeviceByAddress(MacAddressaddress)
Parameters
address
MacAddress — Required
The MAC address of the device to retrieve.
Returns
IDevice*
Returns a device interface IDevice.
Throws
OutOfMemoryError— if not enough memory is available to create the device.BluetoothNotFound— if device is not known (paired).
addErrorListener()
Subscribe to critical Blueteooth service error.com.amazon.apmf.ISubscription*addErrorListener(IErrorListener*listener)
Parameters
listener
IErrorListener* — Required
The listener, see IErrorListener.
Returns
com.amazon.apmf.ISubscription*
Returns a pointer to ISubscription.
Throws
OutOfMemoryError— if not enough memory is available to create the device.

