Android Guides | Samples

Android.Bluetooth Namespace

Provides classes that manage Bluetooth functionality, such as scanning for devices, connecting with devices, and managing data transfer between devices.

Remarks

Provides classes that manage Bluetooth functionality, such as scanning for devices, connecting with devices, and managing data transfer between devices. The Bluetooth API supports both "Classic Bluetooth" and Bluetooth Low Energy.

For more information about Classic Bluetooth, see the Bluetooth guide. For more information about Bluetooth Low Energy, see the Bluetooth Low Energy (BLE) guide.

The Bluetooth APIs let applications:

  • Scan for other Bluetooth devices (including BLE devices).
  • Query the local Bluetooth adapter for paired Bluetooth devices.
  • Establish RFCOMM channels/sockets.
  • Connect to specified sockets on other devices.
  • Transfer data to and from other devices.
  • Communicate with BLE devices, such as proximity sensors, heart rate monitors, fitness devices, and so on.
  • Act as a GATT client or a GATT server (BLE).

To perform Bluetooth communication using these APIs, an application must declare the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH permission. Some additional functionality, such as requesting device discovery, also requires the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH_ADMIN permission.

Note: Not all Android-powered devices provide Bluetooth functionality.

Classes

TypeReason
A2dpStateEnumerates values returned by several types.
AtCommandEnumerates values returned by several types.
BluetoothA2dpThis class provides the public APIs to control the Bluetooth A2DP profile.
BluetoothA2dp+InterfaceConsts
BluetoothAdapterRepresents the local device Bluetooth adapter.
BluetoothAdapter+ILeScanCallbackCallback interface used to deliver LE scan results.
BluetoothAssignedNumbersBluetooth Assigned Numbers.
BluetoothClassRepresents a Bluetooth class, which describes general characteristics and capabilities of a device.
BluetoothClass+DeviceDefines all device class constants.
BluetoothClass+Device+MajorDefines all major device class constants.
BluetoothClass+InterfaceConsts
BluetoothClass+ServiceDefines all service class constants.
BluetoothDeviceRepresents a remote Bluetooth device.
BluetoothDevice+InterfaceConsts
BluetoothDeviceTypeEnumerates values returned by several types.
BluetoothGattPublic API for the Bluetooth GATT Profile.
BluetoothGatt+InterfaceConsts
BluetoothGattCallbackThis abstract class is used to implement BluetoothGatt callbacks.
BluetoothGattCharacteristicRepresents a Bluetooth GATT Characteristic
BluetoothGattDescriptorRepresents a Bluetooth GATT Descriptor
BluetoothGattServerPublic API for the Bluetooth GATT Profile server role.
BluetoothGattServer+InterfaceConsts
BluetoothGattServerCallbackThis abstract class is used to implement BluetoothGattServer callbacks.
BluetoothGattServiceRepresents a Bluetooth GATT Service
BluetoothHeadsetPublic API for controlling the Bluetooth Headset Service.
BluetoothHeadset+InterfaceConsts
BluetoothHealthPublic API for Bluetooth Health Profile.
BluetoothHealth+InterfaceConsts
BluetoothHealthAppConfigurationThe Bluetooth Health Application Configuration that is used in conjunction with the BluetoothHealth class.
BluetoothHealthAppConfiguration+InterfaceConsts
BluetoothHealthCallbackThis abstract class is used to implement BluetoothHealth callbacks.
BluetoothManagerHigh level manager used to obtain an instance of an BluetoothAdapter and to conduct overall Bluetooth Management.
BluetoothProfilePublic APIs for the Bluetooth Profiles.
BluetoothProfileConsts
BluetoothServerSocketA listening Bluetooth socket.
BluetoothSocketA connected or connecting Bluetooth socket.
BondEnumerates values returned by several types.
DeviceClassEnumerates values returned by several types.
GattConnectionPriorityEnumerates values returned by several types and taken as a parameter of the BluetoothGatt.RequestConnectionPriority member.
GattDescriptorPermissionEnumerates values returned by several types and taken as a parameter of the Android.Bluetooth.BluetoothGattDescriptor..ctor member.
GattFormatEnumerates values returned by several types and taken as a parameter of several methods of BluetoothGattCharacteristic.
GattPermissionEnumerates values returned by several types and taken as a parameter of the Android.Bluetooth.BluetoothGattCharacteristic..ctor member.
GattPropertyEnumerates values returned by several types and taken as a parameter of the Android.Bluetooth.BluetoothGattCharacteristic..ctor member.
GattServiceTypeEnumerates values returned by several types and taken as a parameter of the Android.Bluetooth.BluetoothGattService..ctor member.
GattStatusEnumerates values returned by several types and taken as a parameter of several types.
GattWriteTypeEnumerates values returned by several types.
HeadsetAudioStateEnumerates values returned by several types.
HealthApplicationConfigEnumerates values returned by several types and taken as a parameter of the BluetoothHealthCallback.OnHealthAppConfigurationStatusChange member.
HealthChannelTypeEnumerates values returned by several types.
HealthStateEnumerates values returned by several types and taken as a parameter of the BluetoothHealthCallback.OnHealthChannelStateChange, and BluetoothHealthCallback.OnHealthChannelStateChange members.
IBluetoothProfilePublic APIs for the Bluetooth Profiles.
IBluetoothProfileServiceListenerAn interface for notifying BluetoothProfile IPC clients when they have been connected or disconnected to the service.
MajorDeviceClassEnumerates values returned by several types.
ProfileStateEnumerates values returned by several types and taken as a parameter of several types.
ProfileTypeEnumerates values returned by several types and taken as a parameter of several types.
RoleTypeEnumerates values returned by several types.
ScanModeEnumerates values returned by several types.
ServiceClassEnumerates values returned by several methods of ServiceClass and taken as a parameter of the BluetoothClass.HasService member.
ServiceConnectedEventArgs
ServiceDisconnectedEventArgs
StateEnumerates values returned by several types.