diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiConstants.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiConstants.java index ea39ee5dc8..4fe8b57d71 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiConstants.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiConstants.java @@ -81,6 +81,7 @@ public final class HuaweiConstants { public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-"; public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-"; public static final String HU_WATCHGTRUNNER_NAME = "huawei watch gt runner-"; + public static final String HU_WATCHGTRUNNER2_NAME = "watch gt runner 2-"; public static final String HU_WATCHGTCYBER_NAME = "huawei watch gt cyber-"; public static final String HU_WATCH3_NAME = "huawei watch 3-"; public static final String HU_WATCH3PRO_NAME = "huawei watch 3 pro-"; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/huaweiwatchgtrunner2/HuaweiWatchGTRunner2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/huaweiwatchgtrunner2/HuaweiWatchGTRunner2Coordinator.java new file mode 100644 index 0000000000..be9f336589 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/huaweiwatchgtrunner2/HuaweiWatchGTRunner2Coordinator.java @@ -0,0 +1,49 @@ +/* Copyright (C) 2026 liberodark + + 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.huawei.huaweiwatchgtrunner2; + +import androidx.annotation.NonNull; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiBRCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants; +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; + +public class HuaweiWatchGTRunner2Coordinator extends HuaweiBRCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("(" + HuaweiConstants.HU_WATCHGTRUNNER2_NAME + ").*", Pattern.CASE_INSENSITIVE); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_huawei_watchgtrunner2; + } + + @Override + public boolean supportsUnicodeEmojis(@NonNull GBDevice device) { + // HarmonyOS watch + return true; + } + + @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 124d23ea9d..ec37b1a6bd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -308,6 +308,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt5.Huawei import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt6.HuaweiWatchGT6Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtcyber.HuaweiWatchGTCyberCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner.HuaweiWatchGTRunnerCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner2.HuaweiWatchGTRunner2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate.HuaweiWatchUltimateCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.id115.ID115Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.idasen.IdasenCoordinator; @@ -829,6 +830,7 @@ public enum DeviceType { HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class), HUAWEIWATCHGT6(HuaweiWatchGT6Coordinator.class), HUAWEIWATCHGTRUNNER(HuaweiWatchGTRunnerCoordinator.class), + HUAWEIWATCHGTRUNNER2(HuaweiWatchGTRunner2Coordinator.class), HUAWEIWATCHGTCYBER(HuaweiWatchGTCyberCoordinator.class), HUAWEIBAND8(HuaweiBand8Coordinator.class), HUAWEIBAND9(HuaweiBand9Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5362882baa..be9c4d96b8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2175,6 +2175,7 @@ Huawei Watch GT 5 (Pro) Huawei Watch GT 6 (Pro) Huawei Watch GT Runner + Huawei Watch GT Runner 2 Huawei Watch GT Cyber Huawei Watch Fit Huawei Watch Fit 2