diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/RecordedDataTypes.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/RecordedDataTypes.java index 9439678a9..560de7383 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/RecordedDataTypes.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/RecordedDataTypes.java @@ -34,6 +34,6 @@ public class RecordedDataTypes { // Types to fetch during sync - scheduled, sync button, etc. // Does not include debug logs or workouts - public static final int TYPE_SYNC = TYPE_ACTIVITY | TYPE_SPO2 | TYPE_STRESS | + public static final int TYPE_SYNC = TYPE_ACTIVITY | TYPE_GPS_TRACKS | TYPE_SPO2 | TYPE_STRESS | TYPE_HEART_RATE | TYPE_PAI | TYPE_SLEEP_RESPIRATORY_RATE; } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java index 0d8c739f7..81efb6385 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java @@ -1623,15 +1623,14 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport { @Override public void onFetchRecordedData(int dataTypes) { + // FIXME: The fetches are currently mutually exclusive, otherwise the operations will + // interrupt one-another if ((dataTypes & RecordedDataTypes.TYPE_ACTIVITY) != 0) { fetchActivityData(getLastSuccessfulSyncTime()); - } - - if ((dataTypes & RecordedDataTypes.TYPE_GPS_TRACKS) !=0) { + } else if ((dataTypes & RecordedDataTypes.TYPE_GPS_TRACKS) !=0) { JSONObject requestTracksListObj = BangleJSActivityTrack.compileTracksListRequest(getDevice(), getContext()); uartTxJSON("requestActivityTracksList", requestTracksListObj); - } - if ((dataTypes & RecordedDataTypes.TYPE_DEBUGLOGS) !=0) { + } else if ((dataTypes & RecordedDataTypes.TYPE_DEBUGLOGS) !=0) { File dir; try { dir = FileUtils.getExternalFilesDir(); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/flipper/zero/support/FlipperZeroSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/flipper/zero/support/FlipperZeroSupport.java index 5f4a5c4ec..eeb241349 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/flipper/zero/support/FlipperZeroSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/flipper/zero/support/FlipperZeroSupport.java @@ -244,8 +244,6 @@ public class FlipperZeroSupport extends FlipperZeroBaseSupport{ @Override public void onFetchRecordedData(int dataTypes) { - super.onFetchRecordedData(dataTypes); - onTestNewFunction(); } } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/soflow/SoFlowSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/soflow/SoFlowSupport.java index 170ac736c..fc166f612 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/soflow/SoFlowSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/soflow/SoFlowSupport.java @@ -19,26 +19,17 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.soflow; import android.bluetooth.BluetoothGatt; import android.bluetooth.BluetoothGattCharacteristic; import android.content.SharedPreferences; -import android.net.Uri; import android.widget.Toast; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; -import java.util.ArrayList; import java.util.UUID; import nodomain.freeyourgadget.gadgetbridge.GBApplication; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventVersionInfo; import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; -import nodomain.freeyourgadget.gadgetbridge.model.Alarm; -import nodomain.freeyourgadget.gadgetbridge.model.CalendarEventSpec; -import nodomain.freeyourgadget.gadgetbridge.model.CallSpec; -import nodomain.freeyourgadget.gadgetbridge.model.CannedMessagesSpec; -import nodomain.freeyourgadget.gadgetbridge.model.MusicSpec; -import nodomain.freeyourgadget.gadgetbridge.model.MusicStateSpec; -import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec; import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService; import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder; @@ -213,136 +204,6 @@ public class SoFlowSupport extends AbstractBTLEDeviceSupport { } } - @Override - public void onNotification(NotificationSpec notificationSpec) { - } - - @Override - public void onDeleteNotification(int id) { - - } - - @Override - public void onSetTime() { - - } - - @Override - public void onSetAlarms(ArrayList alarms) { - - } - - @Override - public void onSetCallState(CallSpec callSpec) { - - } - - @Override - public void onSetCannedMessages(CannedMessagesSpec cannedMessagesSpec) { - - } - - @Override - public void onSetMusicState(MusicStateSpec stateSpec) { - - } - - @Override - public void onSetMusicInfo(MusicSpec musicSpec) { - - } - - @Override - public void onEnableRealtimeSteps(boolean enable) { - - } - - @Override - public void onInstallApp(Uri uri) { - - } - - @Override - public void onAppInfoReq() { - - } - - @Override - public void onAppStart(UUID uuid, boolean start) { - - } - - @Override - public void onAppDelete(UUID uuid) { - - } - - @Override - public void onAppConfiguration(UUID appUuid, String config, Integer id) { - - } - - @Override - public void onAppReorder(UUID[] uuids) { - - } - - @Override - public void onFetchRecordedData(int dataTypes) { - - } - - @Override - public void onReset(int flags) { - - } - - @Override - public void onHeartRateTest() { - - } - - @Override - public void onEnableRealtimeHeartRateMeasurement(boolean enable) { - - } - - @Override - public void onFindDevice(boolean start) { - - } - - @Override - public void onSetConstantVibration(int integer) { - - } - - - @Override - public void onScreenshotReq() { - - } - - @Override - public void onEnableHeartRateSleepSupport(boolean enable) { - - } - - @Override - public void onSetHeartRateMeasurementInterval(int seconds) { - - } - - @Override - public void onAddCalendarEvent(CalendarEventSpec calendarEventSpec) { - - } - - @Override - public void onDeleteCalendarEvent(byte type, long id) { - - } - @Override public boolean onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { @@ -355,11 +216,6 @@ public class SoFlowSupport extends AbstractBTLEDeviceSupport { return false; } - @Override - public void onReadConfiguration(String config) { - - } - @Override public void onTestNewFunction() { TransactionBuilder builder; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/vesc/VescDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/vesc/VescDeviceSupport.java index 1c72c5af0..c9d7e2d7e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/vesc/VescDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/vesc/VescDeviceSupport.java @@ -73,7 +73,6 @@ public class VescDeviceSupport extends VescBaseDeviceSupport { @Override public void onFetchRecordedData(int dataTypes) { - super.onFetchRecordedData(dataTypes); getValues(); }