BlueToothDevice
常用函数
getAddress() //Returns the hardware address of this BluetoothDevice
getName() //Get the friendly Bluetooth name of the remote device
createBond() //Start the bonding (pairing) process with the remote device.
removeBond() //Remove bond (pairing) with the remote device.
getUuids() //Returns the supported features (UUIDs) of the remote device.
connectGatt() //Connect to GATT Server hosted by this device.
BluetoothA2dp
常用函数
connect() //Initiate connection to a profile of the remote Bluetooth device.
disconnect() //Initiate disconnection from a profile
getConnectedDevices() //Get connected devices for this specific profile.
setActiveDevice() //Select a connected device as active. The active device selection is per profile. An active device’s purpose is profile-specifi
getActiveDevice() //Get the connected device that is active.
BluetoothAdapter
常用函数
getDefaultAdapter() //Get a handle to the default local Bluetooth adapter.
getRemoteDevice() //Get a BluetoothDevice object for the given Bluetooth hardware address.
startDiscovery() //Start the remote device discovery process.
cancelDiscovery() //Cancel the current device discovery process.
getBondedDevices() //Return the set of BluetoothDevice objects that are bonded (paired) to the local adapter.
setScanMode() //Set the Bluetooth scan mode of the local Bluetooth adapter.
isEnabled() //Return true if Bluetooth is currently enabled and ready for use.