mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
ble: use UUID version of TransactionBuilder.read/write/notify (#5222)
Using the UUID version instead of BluetoothGattCharacteristic version ensures that, if a characteristic is missing on the gadget GB actually logs what characteristic is missing.
This commit is contained in:
+1
-4
@@ -127,10 +127,7 @@ public class CyclingSensorSupport extends CyclingSensorBaseSupport {
|
||||
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
|
||||
builder.setDeviceState(GBDevice.State.INITIALIZING);
|
||||
|
||||
BluetoothGattCharacteristic measurementCharacteristic =
|
||||
getCharacteristic(UUID_CYCLING_SENSOR_CSC_MEASUREMENT);
|
||||
|
||||
builder.notify(measurementCharacteristic, true);
|
||||
builder.notify(UUID_CYCLING_SENSOR_CSC_MEASUREMENT, true);
|
||||
|
||||
builder.setDeviceState(GBDevice.State.INITIALIZED);
|
||||
batteryCharacteristic = getCharacteristic(BatteryInfoProfile.UUID_CHARACTERISTIC_BATTERY_LEVEL);
|
||||
|
||||
+2
-3
@@ -195,10 +195,9 @@ public class DomyosT540Support extends AbstractBTLESingleDeviceSupport {
|
||||
public void onFindDevice(boolean start) {
|
||||
byte[] command = new byte[]{(byte) 0xf0, (byte) 0xaf, (byte) (start ? 0x01 : 0x00), 0x00};
|
||||
command[3] = getChecksum(command);
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(UUUD_CHARACTERISTICS_WRITE);
|
||||
|
||||
|
||||
TransactionBuilder builder = createTransactionBuilder("beep");
|
||||
builder.write(characteristic, command);
|
||||
builder.write(UUUD_CHARACTERISTICS_WRITE, command);
|
||||
builder.queue();
|
||||
|
||||
}
|
||||
|
||||
+1
-2
@@ -106,7 +106,6 @@ class GloryFitFetcher(val mSupport: GloryFitSupport) {
|
||||
|
||||
private fun sendFetchCommand(type: GloryFitFetchType) {
|
||||
val builder = mSupport.createTransactionBuilder("fetch $type")
|
||||
val characteristic = mSupport.getCharacteristic(GloryFitSupport.UUID_CHARACTERISTIC_GLORYFIT_CMD_WRITE)
|
||||
val cmd: ByteArray
|
||||
when (type) {
|
||||
GloryFitFetchType.STEPS -> {
|
||||
@@ -126,7 +125,7 @@ class GloryFitFetcher(val mSupport: GloryFitSupport) {
|
||||
}
|
||||
}
|
||||
|
||||
builder.write(characteristic, *cmd)
|
||||
builder.write(GloryFitSupport.UUID_CHARACTERISTIC_GLORYFIT_CMD_WRITE, *cmd)
|
||||
|
||||
builder.queue()
|
||||
}
|
||||
|
||||
+1
-2
@@ -594,8 +594,7 @@ public abstract class HuamiSupport extends AbstractBTLESingleDeviceSupport
|
||||
|
||||
private void requestBatteryInfo(TransactionBuilder builder) {
|
||||
LOG.debug("Requesting Battery Info!");
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(HuamiService.UUID_CHARACTERISTIC_6_BATTERY_INFO);
|
||||
builder.read(characteristic);
|
||||
builder.read(HuamiService.UUID_CHARACTERISTIC_6_BATTERY_INFO);
|
||||
}
|
||||
|
||||
public void requestDeviceInfo(TransactionBuilder builder) {
|
||||
|
||||
+1
-2
@@ -40,14 +40,13 @@ public class Mi2NotificationStrategy extends V2NotificationStrategy<HuamiSupport
|
||||
@Override
|
||||
protected void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, BtLEAction extraAction, TransactionBuilder builder) {
|
||||
startNotify(builder, vibrationProfile.getAlertLevel(), simpleNotification);
|
||||
BluetoothGattCharacteristic alert = getSupport().getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL);
|
||||
byte repeat = (byte) (vibrationProfile.getRepeat() * (vibrationProfile.getOnOffSequence().length / 2));
|
||||
int waitDuration = 0;
|
||||
if (repeat > 0) {
|
||||
short vibration = (short) vibrationProfile.getOnOffSequence()[0];
|
||||
short pause = (short) vibrationProfile.getOnOffSequence()[1];
|
||||
waitDuration = (vibration + pause) * repeat;
|
||||
builder.write(alert, new byte[]{-1, (byte) (vibration & 255), (byte) (vibration >> 8 & 255), (byte) (pause & 255), (byte) (pause >> 8 & 255), repeat});
|
||||
builder.write(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL, new byte[]{-1, (byte) (vibration & 255), (byte) (vibration >> 8 & 255), (byte) (pause & 255), (byte) (pause >> 8 & 255), repeat});
|
||||
}
|
||||
|
||||
// Don't wait during an incoming call, otherwise we'll not be able to stop the call notification
|
||||
|
||||
+1
-2
@@ -88,7 +88,6 @@ public class Mi2TextNotificationStrategy extends Mi2NotificationStrategy {
|
||||
|
||||
@Override
|
||||
public void stopCurrentNotification(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic alert = getSupport().getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_NEW_ALERT);
|
||||
builder.write(alert, new byte[]{(byte) AlertCategory.IncomingCall.getId(), 0});
|
||||
builder.write(GattCharacteristic.UUID_CHARACTERISTIC_NEW_ALERT, new byte[]{(byte) AlertCategory.IncomingCall.getId(), 0});
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -330,9 +330,7 @@ public class Request {
|
||||
if (!this.supportProvider.isBLE()) {
|
||||
this.builderBr.write(data);
|
||||
} else {
|
||||
BluetoothGattCharacteristic characteristic = supportProvider
|
||||
.getLeCharacteristic(HuaweiConstants.UUID_CHARACTERISTIC_HUAWEI_WRITE);
|
||||
this.builderLe.write(characteristic, data);
|
||||
this.builderLe.write(HuaweiConstants.UUID_CHARACTERISTIC_HUAWEI_WRITE, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -182,10 +182,8 @@ public class IdasenDeviceSupport extends AbstractBTLESingleDeviceSupport {
|
||||
}
|
||||
|
||||
private void readCharacteristic(String taskName, UUID charac) {
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(charac);
|
||||
|
||||
TransactionBuilder builder = createTransactionBuilder(taskName);
|
||||
builder.read(characteristic);
|
||||
builder.read(charac);
|
||||
builder.queue();
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -114,10 +114,9 @@ public class ITagSupport extends AbstractBTLESingleDeviceSupport {
|
||||
@Override
|
||||
public void onSetConstantVibration(int intensity) {
|
||||
getQueue().clear();
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(ITagConstants.UUID_LINK_LOSS_ALERT_LEVEL);
|
||||
|
||||
TransactionBuilder builder = createTransactionBuilder("beeping");
|
||||
builder.write(characteristic, new byte[]{(byte) intensity});
|
||||
builder.write(ITagConstants.UUID_LINK_LOSS_ALERT_LEVEL, new byte[]{(byte) intensity});
|
||||
builder.queue();
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -63,9 +63,7 @@ public abstract class Request extends AbstractBTLEOperation<LefunDeviceSupport>
|
||||
|
||||
@Override
|
||||
protected void doPerform() throws IOException {
|
||||
BluetoothGattCharacteristic characteristic = getSupport()
|
||||
.getCharacteristic(LefunConstants.UUID_CHARACTERISTIC_LEFUN_WRITE);
|
||||
builder.write(characteristic, createRequest());
|
||||
builder.write(LefunConstants.UUID_CHARACTERISTIC_LEFUN_WRITE, createRequest());
|
||||
if (isSelfQueue())
|
||||
builder.queueConnected();
|
||||
}
|
||||
|
||||
+3
-6
@@ -314,17 +314,14 @@ public class MiBandSupport extends AbstractBTLESingleDeviceSupport {
|
||||
|
||||
private MiBandSupport requestBatteryInfo(TransactionBuilder builder) {
|
||||
LOG.debug("Requesting Battery Info!");
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_BATTERY);
|
||||
builder.read(characteristic);
|
||||
builder.read(MiBandService.UUID_CHARACTERISTIC_BATTERY);
|
||||
return this;
|
||||
}
|
||||
|
||||
private MiBandSupport requestDeviceInfo(TransactionBuilder builder) {
|
||||
LOG.debug("Requesting Device Info!");
|
||||
BluetoothGattCharacteristic deviceInfo = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_DEVICE_INFO);
|
||||
builder.read(deviceInfo);
|
||||
BluetoothGattCharacteristic deviceName = getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_DEVICE_NAME);
|
||||
builder.read(deviceName);
|
||||
builder.read(MiBandService.UUID_CHARACTERISTIC_DEVICE_INFO);
|
||||
builder.read(GattCharacteristic.UUID_CHARACTERISTIC_DEVICE_NAME);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -42,8 +42,7 @@ public class V1NotificationStrategy implements NotificationStrategy {
|
||||
|
||||
@Override
|
||||
public void sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, BtLEAction extraAction) {
|
||||
BluetoothGattCharacteristic characteristic = support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
|
||||
builder.write(characteristic, getDefaultNotification());
|
||||
builder.write(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT, getDefaultNotification());
|
||||
builder.add(extraAction);
|
||||
}
|
||||
|
||||
@@ -105,8 +104,7 @@ public class V1NotificationStrategy implements NotificationStrategy {
|
||||
|
||||
@Override
|
||||
public void stopCurrentNotification(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic controlPoint = support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
|
||||
builder.write(controlPoint, stopVibrate);
|
||||
builder.write(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT, stopVibrate);
|
||||
}
|
||||
|
||||
// private void sendCustomNotification(int vibrateDuration, int vibrateTimes, int pause, int flashTimes, int flashColour, int originalColour, long flashDuration, TransactionBuilder builder) {
|
||||
|
||||
+1
-2
@@ -77,7 +77,6 @@ public class V2NotificationStrategy<T extends AbstractBTLESingleDeviceSupport> i
|
||||
|
||||
@Override
|
||||
public void stopCurrentNotification(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic alert = support.getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL);
|
||||
builder.write(alert, new byte[]{GattCharacteristic.NO_ALERT});
|
||||
builder.write(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL, new byte[]{GattCharacteristic.NO_ALERT});
|
||||
}
|
||||
}
|
||||
|
||||
+7
-14
@@ -126,11 +126,10 @@ public class MijiaLywsdSupport extends AbstractBTLESingleDeviceSupport {
|
||||
}
|
||||
|
||||
private void setTime(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic timeCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_TIME);
|
||||
long ts = System.currentTimeMillis();
|
||||
byte offsetHours = (byte) (SimpleTimeZone.getDefault().getOffset(ts) / (1000 * 60 * 60));
|
||||
ts = (ts + 250 + 500) / 1000; // round to seconds with +250 ms to compensate for BLE connection interval
|
||||
builder.write(timeCharacteristc, new byte[]{
|
||||
builder.write(MijiaLywsdSupport.UUID_TIME, new byte[]{
|
||||
(byte) (ts & 0xff),
|
||||
(byte) ((ts >> 8) & 0xff),
|
||||
(byte) ((ts >> 16) & 0xff),
|
||||
@@ -139,29 +138,24 @@ public class MijiaLywsdSupport extends AbstractBTLESingleDeviceSupport {
|
||||
}
|
||||
|
||||
private void setConnectionInterval(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic intervalCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_CONN_INTERVAL);
|
||||
builder.write(intervalCharacteristc, new byte[]{(byte) 0xf4, (byte) 0x01}); // maximum interval of 500 ms
|
||||
builder.write(MijiaLywsdSupport.UUID_CONN_INTERVAL, new byte[]{(byte) 0xf4, (byte) 0x01}); // maximum interval of 500 ms
|
||||
}
|
||||
|
||||
private void getBatteryInfo(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic batteryCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_BATTERY);
|
||||
builder.read(batteryCharacteristc);
|
||||
builder.read(MijiaLywsdSupport.UUID_BATTERY);
|
||||
}
|
||||
|
||||
private void getComfortLevel(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic comfortCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_COMFORT_LEVEL);
|
||||
builder.read(comfortCharacteristc);
|
||||
builder.read(MijiaLywsdSupport.UUID_COMFORT_LEVEL);
|
||||
}
|
||||
|
||||
private void getTime(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic timeCharacteristic = getCharacteristic(MijiaLywsdSupport.UUID_TIME);
|
||||
builder.read(timeCharacteristic);
|
||||
builder.read(MijiaLywsdSupport.UUID_TIME);
|
||||
}
|
||||
|
||||
private void setTemperatureScale(TransactionBuilder builder, SharedPreferences prefs) {
|
||||
String scale = prefs.getString(PREF_TEMPERATURE_SCALE_CF, "");
|
||||
BluetoothGattCharacteristic scaleCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_SCALE);
|
||||
builder.write(scaleCharacteristc, new byte[]{(byte) ("f".equals(scale) ? 0x01 : 0xff)});
|
||||
builder.write(MijiaLywsdSupport.UUID_SCALE, new byte[]{(byte) ("f".equals(scale) ? 0x01 : 0xff)});
|
||||
}
|
||||
|
||||
private void setComfortLevel(TransactionBuilder builder, SharedPreferences prefs) {
|
||||
@@ -175,7 +169,6 @@ public class MijiaLywsdSupport extends AbstractBTLESingleDeviceSupport {
|
||||
if (temperatureLower > temperatureUpper || humidityLower > humidityUpper)
|
||||
return;
|
||||
|
||||
BluetoothGattCharacteristic comfortCharacteristc = getCharacteristic(MijiaLywsdSupport.UUID_COMFORT_LEVEL);
|
||||
ByteBuffer buf = ByteBuffer.allocate(length);
|
||||
|
||||
buf.order(ByteOrder.LITTLE_ENDIAN);
|
||||
@@ -197,7 +190,7 @@ public class MijiaLywsdSupport extends AbstractBTLESingleDeviceSupport {
|
||||
return;
|
||||
}
|
||||
|
||||
builder.write(comfortCharacteristc, buf.array());
|
||||
builder.write(MijiaLywsdSupport.UUID_COMFORT_LEVEL, buf.array());
|
||||
}
|
||||
|
||||
private void handleBatteryInfo(byte[] value, int status) {
|
||||
|
||||
+2
-6
@@ -455,10 +455,8 @@ public class NutSupport extends AbstractBTLESingleDeviceSupport {
|
||||
* @param data the data to write
|
||||
*/
|
||||
private void writeCharacteristic(String taskName, UUID charac, byte[] data) {
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(charac);
|
||||
|
||||
TransactionBuilder builder = createTransactionBuilder(taskName);
|
||||
builder.write(characteristic, data);
|
||||
builder.write(charac, data);
|
||||
builder.queue();
|
||||
}
|
||||
|
||||
@@ -469,10 +467,8 @@ public class NutSupport extends AbstractBTLESingleDeviceSupport {
|
||||
* @param charac the characteristic to read
|
||||
*/
|
||||
private void readCharacteristic(String taskName, UUID charac) {
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(charac);
|
||||
|
||||
TransactionBuilder builder = createTransactionBuilder(taskName);
|
||||
builder.read(characteristic);
|
||||
builder.read(charac);
|
||||
builder.queue();
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -130,14 +130,12 @@ public class SonySWR12DeviceSupport extends AbstractBTLESingleDeviceSupport {
|
||||
}
|
||||
|
||||
private void setTime(TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic timeCharacteristic = getCharacteristic(SonySWR12Constants.UUID_CHARACTERISTIC_TIME);
|
||||
builder.write(timeCharacteristic, new BandTime(Calendar.getInstance()).toByteArray());
|
||||
builder.write(SonySWR12Constants.UUID_CHARACTERISTIC_TIME, new BandTime(Calendar.getInstance()).toByteArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSetAlarms(ArrayList<? extends Alarm> alarms) {
|
||||
try {
|
||||
BluetoothGattCharacteristic alarmCharacteristic = getCharacteristic(SonySWR12Constants.UUID_CHARACTERISTIC_ALARM);
|
||||
TransactionBuilder builder = performInitialized("alarm");
|
||||
int prefInterval = Integer.valueOf(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress())
|
||||
.getString(DeviceSettingsPreferenceConst.PREF_SONYSWR12_SMART_INTERVAL, "0"));
|
||||
@@ -147,7 +145,7 @@ public class SonySWR12DeviceSupport extends AbstractBTLESingleDeviceSupport {
|
||||
if (bandAlarm != null)
|
||||
bandAlarmList.add(bandAlarm);
|
||||
}
|
||||
builder.write(alarmCharacteristic, new BandAlarms(bandAlarmList).toByteArray());
|
||||
builder.write(SonySWR12Constants.UUID_CHARACTERISTIC_ALARM, new BandAlarms(bandAlarmList).toByteArray());
|
||||
builder.queue();
|
||||
} catch (Exception e) {
|
||||
GB.toast(getContext(), "Error setting alarms: " + e.getLocalizedMessage(), Toast.LENGTH_LONG, GB.ERROR, e);
|
||||
|
||||
+1
-2
@@ -157,8 +157,7 @@ public class SuperCarsSupport extends AbstractBTLESingleDeviceSupport {
|
||||
|
||||
byte[] command = craft_packet(speed, direction, movement, light);
|
||||
TransactionBuilder builder = createTransactionBuilder("send data");
|
||||
BluetoothGattCharacteristic writeCharacteristic = getCharacteristic(SuperCarsConstants.CHARACTERISTIC_UUID_FFF1);
|
||||
builder.write(writeCharacteristic, encryptData(command));
|
||||
builder.write(SuperCarsConstants.CHARACTERISTIC_UUID_FFF1, encryptData(command));
|
||||
builder.queue();
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -185,8 +185,7 @@ public class WithingsSteelHRDeviceSupport extends AbstractBTLESingleDeviceSuppor
|
||||
builder.setDeviceState(GBDevice.State.INITIALIZING);
|
||||
getDevice().setFirmwareVersion("N/A");
|
||||
getDevice().setFirmwareVersion2("N/A");
|
||||
BluetoothGattCharacteristic characteristic = getCharacteristic(WithingsUUID.WITHINGS_WRITE_CHARACTERISTIC_UUID);
|
||||
builder.notify(characteristic, true);
|
||||
builder.notify(WithingsUUID.WITHINGS_WRITE_CHARACTERISTIC_UUID, true);
|
||||
logger.debug("Requesting change of MTU...");
|
||||
builder.requestMtu(119);
|
||||
return builder;
|
||||
|
||||
+4
-8
@@ -124,7 +124,6 @@ public class XWatchSupport extends AbstractBTLESingleDeviceSupport {
|
||||
byte[] data;
|
||||
|
||||
LOG.debug("Sending current date to the XWatch");
|
||||
BluetoothGattCharacteristic deviceData = getCharacteristic(XWatchService.UUID_WRITE);
|
||||
|
||||
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
|
||||
String y = time.substring(2, 4);
|
||||
@@ -153,15 +152,14 @@ public class XWatchSupport extends AbstractBTLESingleDeviceSupport {
|
||||
|
||||
data = crcChecksum(data);
|
||||
|
||||
builder.write(deviceData, data);
|
||||
builder.write(XWatchService.UUID_WRITE, data);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private XWatchSupport enableNotifications(TransactionBuilder builder) {
|
||||
LOG.debug("Enabling action button");
|
||||
BluetoothGattCharacteristic deviceInfo = getCharacteristic(XWatchService.UUID_NOTIFY);
|
||||
builder.notify(deviceInfo, true);
|
||||
builder.notify(XWatchService.UUID_NOTIFY, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -174,9 +172,8 @@ public class XWatchSupport extends AbstractBTLESingleDeviceSupport {
|
||||
public void onNotification(NotificationSpec notificationSpec) {
|
||||
try {
|
||||
TransactionBuilder builder = performInitialized("xwatch notification");
|
||||
BluetoothGattCharacteristic deviceData = getCharacteristic(XWatchService.UUID_WRITE);
|
||||
byte[] data = new byte[]{XWatchService.COMMAND_NOTIFICATION, XWatchService.COMMAND_NOTIFICATION_MESSAGE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
builder.write(deviceData, crcChecksum(data));
|
||||
builder.write(XWatchService.UUID_WRITE, crcChecksum(data));
|
||||
builder.queue();
|
||||
} catch (IOException ex) {
|
||||
LOG.error("Unable to send message notification on XWatch device", ex);
|
||||
@@ -205,9 +202,8 @@ public class XWatchSupport extends AbstractBTLESingleDeviceSupport {
|
||||
LOG.debug("Incoming call8");
|
||||
try {
|
||||
TransactionBuilder builder = performInitialized("callnotification");
|
||||
BluetoothGattCharacteristic deviceData = getCharacteristic(XWatchService.UUID_WRITE);
|
||||
byte[] data = new byte[]{XWatchService.COMMAND_NOTIFICATION, XWatchService.COMMAND_NOTIFICATION_PHONE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
builder.write(deviceData, crcChecksum(data));
|
||||
builder.write(XWatchService.UUID_WRITE, crcChecksum(data));
|
||||
builder.queue();
|
||||
} catch (IOException ex) {
|
||||
LOG.error("Unable to send call notification on XWatch device", ex);
|
||||
|
||||
Reference in New Issue
Block a user