diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/gloryfit/watches/QecnatoS10Coordinator.kt b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/gloryfit/watches/QecnatoS10Coordinator.kt new file mode 100644 index 0000000000..5f9a196bb8 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/gloryfit/watches/QecnatoS10Coordinator.kt @@ -0,0 +1,44 @@ +/* Copyright (C) 2025 Jonathan Albrieux + + 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.gloryfit.watches + +import nodomain.freeyourgadget.gadgetbridge.R +import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.GloryFitCoordinator +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice +import java.util.regex.Pattern + +class QecnatoS10Coordinator : GloryFitCoordinator() { + override fun getManufacturer(): String { + return "Qecnato" + } + + override fun getSupportedDeviceName(): Pattern? { + return Pattern.compile("^S10$") + } + + override fun getDeviceNameResource(): Int { + return R.string.devicetype_qecnato_s10 + } + + override fun getBondingStyle(): Int { + return BONDING_STYLE_NONE + } + + override fun getAlarmSlotCount(device: GBDevice): Int { + return 0 + } +} 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 2fc18c75a9..464c9a6be5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -171,6 +171,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.HaylouWatch import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.ImikiFrame2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.OukitelBT103Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.R1Coordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.QecnatoS10Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.S52Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.Y66Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.gree.GreeAcCoordinator; @@ -795,6 +796,7 @@ public enum DeviceType { OPPO_ENCO_BUDS2(OppoEncoBuds2Coordinator.class), OUKITEL_BT103(OukitelBT103Coordinator.class), DOTN_P66D(DotnP66DCoordinator.class), + QECNATO_S10(QecnatoS10Coordinator.class), R1(R1Coordinator.class), IMIKI_FRAME_2(ImikiFrame2Coordinator.class), HAYLOU_WATCH_2_PRO(HaylouWatch2ProCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 133d39ed44..ec23583cba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -4347,6 +4347,7 @@ R1 Haylou Watch 2 Pro Dotn P66D + Qecnato S10 Time interval Restrict to specific intervals Enable the deprecated Notification Collector Monitor Service 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 4995129841..d881618f2a 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java @@ -39,6 +39,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase { put("IMIKI FRAME 2", DeviceType.IMIKI_FRAME_2); put("HAYLOU Watch 2 Pro", DeviceType.HAYLOU_WATCH_2_PRO); put("Y66(ID-AB01)", DeviceType.Y66); + put("S10", DeviceType.QECNATO_S10); put("S52", DeviceType.S52); put("R11C_B200", DeviceType.YAWELL_R11); put("R11_B200", DeviceType.YAWELL_R11);