java.lang.Object | |
↳ | android.bluetooth.BluetoothGattServerCallback |
This abstract class is used to implement BluetoothGattServer
callbacks.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A remote client has requested to read a local characteristic.
| |||||||||||
A remote client has requested to write to a local characteristic.
| |||||||||||
Callback indicating when a remote device has been connected or disconnected.
| |||||||||||
A remote client has requested to read a local descriptor.
| |||||||||||
A remote client has requested to write to a local descriptor.
| |||||||||||
Execute all pending write operations for this device.
| |||||||||||
Callback indicating the MTU for a given device connection has changed.
| |||||||||||
Callback invoked when a notification or indication has been sent to
a remote device.
| |||||||||||
Indicates whether a local service has been added successfully.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
A remote client has requested to read a local characteristic.
An application must call sendResponse(BluetoothDevice, int, int, int, byte[])
to complete the request.
device | The remote device that has requested the read operation |
---|---|
requestId | The Id of the request |
offset | Offset into the value of the characteristic |
characteristic | Characteristic to be read |
A remote client has requested to write to a local characteristic.
An application must call sendResponse(BluetoothDevice, int, int, int, byte[])
to complete the request.
device | The remote device that has requested the write operation |
---|---|
requestId | The Id of the request |
characteristic | Characteristic to be written to. |
preparedWrite | true, if this write operation should be queued for later execution. |
responseNeeded | true, if the remote device requires a response |
offset | The offset given for the value |
value | The value the client wants to assign to the characteristic |
Callback indicating when a remote device has been connected or disconnected.
device | Remote device that has been connected or disconnected. |
---|---|
status | Status of the connect or disconnect operation. |
newState | Returns the new connection state. Can be one of
STATE_DISCONNECTED or
STATE_CONNECTED
|
A remote client has requested to read a local descriptor.
An application must call sendResponse(BluetoothDevice, int, int, int, byte[])
to complete the request.
device | The remote device that has requested the read operation |
---|---|
requestId | The Id of the request |
offset | Offset into the value of the characteristic |
descriptor | Descriptor to be read |
A remote client has requested to write to a local descriptor.
An application must call sendResponse(BluetoothDevice, int, int, int, byte[])
to complete the request.
device | The remote device that has requested the write operation |
---|---|
requestId | The Id of the request |
descriptor | Descriptor to be written to. |
preparedWrite | true, if this write operation should be queued for later execution. |
responseNeeded | true, if the remote device requires a response |
offset | The offset given for the value |
value | The value the client wants to assign to the descriptor |
Execute all pending write operations for this device.
An application must call sendResponse(BluetoothDevice, int, int, int, byte[])
to complete the request.
device | The remote device that has requested the write operations |
---|---|
requestId | The Id of the request |
execute | Whether the pending writes should be executed (true) or cancelled (false) |
Callback indicating the MTU for a given device connection has changed.
This callback will be invoked if a remote client has requested to change the MTU for a given connection.
device | The remote device that requested the MTU change |
---|---|
mtu | The new MTU size |
Callback invoked when a notification or indication has been sent to a remote device.
When multiple notifications are to be sent, an application must wait for this callback to be received before sending additional notifications.
device | The remote device the notification has been sent to |
---|---|
status | GATT_SUCCESS if the operation was successful
|
Indicates whether a local service has been added successfully.
status | Returns GATT_SUCCESS if the service
was added successfully. |
---|---|
service | The service that has been added |