public class DefaultRemoteServiceListener extends Object implements RemoteServiceListener
DefaultRemoteServiceListener class provides a default implementation of the
RemoteServiceListener interface.
The implementation of each method does nothing.
| Constructor and Description |
|---|
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.
|
public void onNotificationReceived(BluetoothConnection connection, BluetoothCharacteristic characteristic, byte[] value)
RemoteServiceListeneronNotificationReceived in interface RemoteServiceListenerconnection - the connection with the device which has sent the notification.characteristic - the characteristic which has changed.value - the value of the characteristic.public void onReadCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status, byte[] value)
RemoteServiceListeneronReadCompleted in interface RemoteServiceListenerconnection - 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)public void onWriteCompleted(BluetoothConnection connection, BluetoothAttribute attribute, byte status)
RemoteServiceListeneronWriteCompleted in interface RemoteServiceListenerconnection - 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[])