diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java index 23f92b21d..80a9eae7d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/lenovo/watchxplus/WatchXPlusDeviceSupport.java @@ -730,8 +730,18 @@ public class WatchXPlusDeviceSupport extends AbstractBTLEDeviceSupport { @Override public void onFetchRecordedData(int dataTypes) { - TransactionBuilder builder; + // get battery state + try { + builder = performInitialized("getBatteryInfo"); + builder.write(getCharacteristic(WatchXPlusConstants.UUID_CHARACTERISTIC_WRITE), + buildCommand(WatchXPlusConstants.CMD_BATTERY_INFO, + WatchXPlusConstants.READ_VALUE)); + builder.queue(getQueue()); + } catch (IOException e) { + LOG.warn("Unable to retrieve battery data", e); + } + try { builder = performInitialized("fetchData"); diff --git a/app/src/main/res/xml/watchxplus_preferences.xml b/app/src/main/res/xml/watchxplus_preferences.xml index 7be6108e9..b06fab593 100644 --- a/app/src/main/res/xml/watchxplus_preferences.xml +++ b/app/src/main/res/xml/watchxplus_preferences.xml @@ -108,14 +108,12 @@ android:inputType="number" android:key="pref_wxp_bp_calibration_low" android:defaultValue="80" - android:title="@string/pref_wxp_bp_calibration_low" - android:summary="@string/pref_rtl_max_line_length_summary"/> + android:title="@string/pref_wxp_bp_calibration_low" /> + android:title="@string/pref_wxp_bp_calibration_high" />