public interface LegoBluetoothDevice extends LegoDevice
LegoDevice.DeviceCategory, LegoDevice.DeviceFunction, LegoDevice.DeviceState
Modifier and Type | Method and Description |
---|---|
void |
addWriteOfCharacteristicToQueue(android.bluetooth.BluetoothGattCharacteristic characteristic,
byte[] data,
int writeType)
Wrapper for
BluetoothGatt.writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic)
On Android we need to maintain a queue of read/write requests to ensure proper functionning. |
android.bluetooth.BluetoothDevice |
getAndroidBluetoothDevice() |
int |
getRSSIValue() |
ScanRecord |
getScanRecord() |
void |
setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic characteristic,
boolean enable)
Wrapper for
BluetoothGatt.setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean) |
getBatteryLevel, getCategory, getConnectState, getDeviceId, getDeviceInfo, getExternalServices, getInternalServices, getLastConnectedNetworkId, getName, getServices, getSupportedFunctions, isButtonPressed, isLowVoltage, registerCallbackListener, setName, unregisterCallbackListener
int getRSSIValue()
ScanRecord getScanRecord()
android.bluetooth.BluetoothDevice getAndroidBluetoothDevice()
void setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic characteristic, boolean enable)
BluetoothGatt.setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean)
characteristic
- The characteristic for which to enable notificationsenable
- Set to true to enable notifications/indicationsvoid addWriteOfCharacteristicToQueue(android.bluetooth.BluetoothGattCharacteristic characteristic, byte[] data, int writeType)
BluetoothGatt.writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic)
On Android we need to maintain a queue of read/write requests to ensure proper functionning.
This call adds write requests to the queue.characteristic
- Characteristic to write on the remote devicedata
- The value data to write. See BluetoothGattCharacteristic.setValue(String)
writeType
- The type of write to perform. See BluetoothGattCharacteristic.setWriteType(int)