android.bluetooth.BluetoothProfile |
Known Indirect Subclasses |
Public APIs for the Bluetooth Profiles.
Clients should call
getProfileProxy(Context, BluetoothProfile.ServiceListener, int)
,
to get the Profile Proxy. Each public profile implements this
interface.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
BluetoothProfile.ServiceListener | An interface for notifying BluetoothProfile IPC clients when they have been connected or disconnected to the service. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | A2DP | A2DP profile. | |||||||||
String | EXTRA_PREVIOUS_STATE | Extra for the connection state intents of the individual profiles. | |||||||||
String | EXTRA_STATE | Extra for the connection state intents of the individual profiles. | |||||||||
int | GATT | GATT | |||||||||
int | GATT_SERVER | GATT_SERVER | |||||||||
int | HEADSET | Headset and Handsfree profile | |||||||||
int | HEALTH | Health Profile | |||||||||
int | STATE_CONNECTED | The profile is in connected state | |||||||||
int | STATE_CONNECTING | The profile is in connecting state | |||||||||
int | STATE_DISCONNECTED | The profile is in disconnected state | |||||||||
int | STATE_DISCONNECTING | The profile is in disconnecting state |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Get connected devices for this specific profile.
|
||||||||||
|
Get the current connection state of the profile
Requires
|
||||||||||
|
Get a list of devices that match any of the given connection
states.
|
Extra for the connection state intents of the individual profiles. This extra represents the previous connection state of the profile of the Bluetooth device.
Extra for the connection state intents of the individual profiles. This extra represents the current connection state of the profile of the Bluetooth device.
GATT_SERVER
Headset and Handsfree profile
The profile is in connected state
The profile is in connecting state
The profile is in disconnected state
The profile is in disconnecting state
Get connected devices for this specific profile.
Return the set of devices which are in state
STATE_CONNECTED
Requires
BLUETOOTH
permission.
Get the current connection state of the profile
Requires
BLUETOOTH
permission.
device | Remote bluetooth device. |
---|
STATE_CONNECTED
,
STATE_CONNECTING
,
STATE_DISCONNECTED
,
STATE_DISCONNECTING
Get a list of devices that match any of the given connection states.
If none of the devices match any of the given states, an empty list will be returned.
Requires
BLUETOOTH
permission.
states |
Array of states. States can be one of
STATE_CONNECTED
,
STATE_CONNECTING
,
STATE_DISCONNECTED
,
STATE_DISCONNECTING
,
|
---|