diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/watches/RedmiWatchMoveCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/watches/RedmiWatchMoveCoordinator.java new file mode 100644 index 0000000000..4a386441e1 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/watches/RedmiWatchMoveCoordinator.java @@ -0,0 +1,69 @@ +/* Copyright (C) 2026 José Rebelo + + This file is part of Gadgetbridge. + + Gadgetbridge is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Gadgetbridge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . */ +package nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches; + +import androidx.annotation.NonNull; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.XiaomiCoordinator; +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; + +public class RedmiWatchMoveCoordinator extends XiaomiCoordinator { + @Override + public int getDeviceNameResource() { + return R.string.devicetype_redmi_watch_move; + } + + @Override + public String getManufacturer() { + return "Redmi"; + } + + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Move$"); + } + + @Override + public ConnectionType getConnectionType() { + // this device likely supports both connection types if we indicate + // that we are an iOS device in the final auth step + return ConnectionType.BT_CLASSIC; + } + + @Override + public int getDefaultIconResource() { + return R.drawable.ic_device_amazfit_bip; + } + + @Override + public int getWorldClocksSlotCount() { + return 20; + } + + @Override + public int getContactsSlotCount(final GBDevice device) { + return 10; + } + + @Override + public DeviceKind getDeviceKind(@NonNull GBDevice device) { + return DeviceKind.WATCH; + } +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java index 0bf9fa34bd..9b21c9e161 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -464,6 +464,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch4Co import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5ActiveCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5LiteCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatchMoveCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1ActiveCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1ProCoordinator; @@ -562,6 +563,7 @@ public enum DeviceType { REDMIWATCH5(RedmiWatch5Coordinator.class), REDMIWATCH5ACTIVE(RedmiWatch5ActiveCoordinator.class), REDMIWATCH5LITE(RedmiWatch5LiteCoordinator.class), + REDMIWATCHMOVE(RedmiWatchMoveCoordinator.class), XIAOMI_WATCH_S1_ACTIVE(XiaomiWatchS1ActiveCoordinator.class), XIAOMI_WATCH_S1_PRO(XiaomiWatchS1ProCoordinator.class), XIAOMI_WATCH_S1(XiaomiWatchS1Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0d11a82276..005e7649ea 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2213,6 +2213,7 @@ Redmi Watch 5 Redmi Watch 5 Active Redmi Watch 5 Lite + Redmi Watch Move AAWireless Yawell R05 Yawell R10 diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java index 5e9e38b9e7..2062a32cd6 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java @@ -116,6 +116,8 @@ public class AbstractDeviceCoordinatorTest extends TestBase { put("Enduro 3", DeviceType.GARMIN_ENDURO_3); put("vívomove Sport", DeviceType.GARMIN_VIVOMOVE_SPORT); // #5080 put("Redmi Watch 5 Active E7B7", DeviceType.REDMIWATCH5ACTIVE); + put("Move", DeviceType.REDMIWATCHMOVE); // matrix + put("BSC300", DeviceType.IGPSPORT_BSC300); // matrix put("Forerunner 165", DeviceType.GARMIN_FORERUNNER_165); put("Xiaomi Smart Band 9 7E1E", DeviceType.MIBAND9); put("Venu 2S", DeviceType.GARMIN_VENU_2S); // #4010