diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/operations/FetchActivityOperation.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/operations/FetchActivityOperation.java index 92449abd..4979d70f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/operations/FetchActivityOperation.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/operations/FetchActivityOperation.java @@ -173,7 +173,7 @@ public class FetchActivityOperation extends AbstractMiBand2Operation { return; } - if (value.length == 17) { + if ((value.length % 4) == 1) { if ((byte) (lastPacketCounter + 1) == value[0] ) { lastPacketCounter++; bufferActivityData(value); @@ -182,7 +182,6 @@ public class FetchActivityOperation extends AbstractMiBand2Operation { handleActivityFetchFinish(); return; } - handleActivityMetadata(value); } else { GB.toast("Error fetching activity data, unexpected package length: " + value.length, Toast.LENGTH_LONG, GB.ERROR); }