android.bluetooth
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
Note:
Not all Android-powered devices provide Bluetooth functionality.
Interfaces
Callback interface used to deliver LE scan results.
Public APIs for the Bluetooth Profiles.
An interface for notifying BluetoothProfile IPC clients when they have
been connected or disconnected to the service.
Classes
This class provides the public APIs to control the Bluetooth A2DP
profile.
Represents the local device Bluetooth adapter.
Bluetooth Assigned Numbers.
Represents a Bluetooth class, which describes general characteristics
and capabilities of a device.
Defines all device class constants.
Defines all major device class constants.
Defines all service class constants.
Represents a remote Bluetooth device.
Public API for the Bluetooth GATT Profile.
This abstract class is used to implement
Represents a Bluetooth GATT Characteristic
A GATT characteristic is a basic data element used to construct a GATT service,
Represents a Bluetooth GATT Descriptor
GATT Descriptors contain additional information and attributes of a GATT
characteristic,
Public API for the Bluetooth GATT Profile server role.
This abstract class is used to implement
Represents a Bluetooth GATT Service
Gatt Service contains a collection of
Public API for controlling the Bluetooth Headset Service.
This class was deprecated
in API level 29.
Health Device Profile (HDP) and MCAP protocol are no longer used. New apps
should use Bluetooth Low Energy based solutions such as
This class was deprecated
in API level 29.
Health Device Profile (HDP) and MCAP protocol are no longer used. New
apps should use Bluetooth Low Energy based solutions such as
This class was deprecated
in API level 29.
Health Device Profile (HDP) and MCAP protocol are no longer used. New
apps should use Bluetooth Low Energy based solutions such as
This class provides the public APIs to control the Hearing Aid profile.
Provides the public APIs to control the Bluetooth HID Device profile.
The template class that applications use to call callback functions on events from the HID
host.
Represents the Quality of Service (QoS) settings for a Bluetooth HID Device application.
Represents the Service Discovery Protocol (SDP) settings for a Bluetooth HID Device application.
This class provides the public APIs to control the LeAudio profile.
High level manager used to obtain an instance of an
A listening Bluetooth socket.
A connected or connecting Bluetooth socket.