public interface RemoteServiceListener
RemoteServiceListener interface provides callbacks related to remote services.
After discovering the services of a device, the application may
set the remote listener of a service in order to be notified
of the events related to this service.
This library provides a default implementation of this interface:
DefaultRemoteServiceListener.
| Modifier and Type | Method and Description |
|---|---|
void |
onNotificationReceived(BluetoothConnection connection,
BluetoothCharacteristic characteristic,
byte[] value)
Called when a characteristic notification or indication is received.
|
void |
onReadCompleted(BluetoothConnection connection,
BluetoothAttribute attribute,
byte status,
byte[] value)
Called when a response to a read request is received.
|
void |
onWriteCompleted(BluetoothConnection connection,
BluetoothAttribute attribute,
byte status)
Called when a response to a write request is received.
|
void onNotificationReceived(BluetoothConnection connection, BluetoothCharacteristic characteristic, byte[] value)
connection - the connection with the device which has sent the notification.characteristic - the characteristic which has changed.value - the value of the characteristic.void onReadCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status, byte[] value)
connection - the connection with the device which has sent the response.attribute - the attribute which was read.status - the response status (see BluetoothStatus).value - the value of the attribute.BluetoothConnection.sendReadRequest(BluetoothAttribute)void onWriteCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status)
connection - the connection with the device which has sent the response.attribute - the attribute which was written.status - the response status (see BluetoothStatus).BluetoothConnection.sendWriteRequest(BluetoothAttribute, byte[])