Slide 50
Slide 50 text
Interact ọ
ồ౼$IBSBDUFSJTUJD֥ᆴ
API level 18
byte[] bytes = characteristic.getValue();
float floatValue = characteristic.getFloatValue(
BluetoothGattCharacteristic.FORMAT_FLOAT, 0);
int intValue = characteristic.getIntValue(
BluetoothGattCharacteristic.FORMAT_SINT8, 0);
int uintValue = characteristic.getIntValue(
BluetoothGattCharacteristic.FORMAT_UINT8, 0);
String stringValue = characteristic.getStringValue(0);
ὕॖၛ≾∄ồ౼
mBluetoothGatt.setCharacteristicNotification(characteristic, true);
UUID CCCD = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(CCCD);
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
mBluetoothGatt.writeDescriptor(descriptor);