diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cmfwatchpro/CmfWatchPro2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cmfwatchpro/CmfWatchPro2Coordinator.java new file mode 100644 index 000000000..b2a811faf --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cmfwatchpro/CmfWatchPro2Coordinator.java @@ -0,0 +1,48 @@ +/* Copyright (C) 2024 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.cmfwatchpro; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; + +public class CmfWatchPro2Coordinator extends CmfWatchProCoordinator { + @Override + public boolean isExperimental() { + return true; + } + + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^CMF Watch Pro 2(-[A-Z0-9]{4})$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_nothing_cmf_watch_pro_2; + } + + @Override + public int getDefaultIconResource() { + return R.drawable.ic_device_watchxplus; + } + + @Override + public int getDisabledIconResource() { + return R.drawable.ic_device_watchxplus_disabled; + } +} 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 b8bb59969..406c3157f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -36,6 +36,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.casio.gb6900.CasioGB6900Devi import nodomain.freeyourgadget.gadgetbridge.devices.casio.gbx100.CasioGBX100DeviceCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.casio.gwb5600.CasioGMWB5000DeviceCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.casio.gwb5600.CasioGWB5600DeviceCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.cmfwatchpro.CmfWatchPro2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.cmfwatchpro.CmfWatchProCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.cycling_sensor.coordinator.CyclingSensorCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.divoom.PixooCoordinator; @@ -403,6 +404,7 @@ public enum DeviceType { NOTHING_EAR2(Ear2Coordinator.class), NOTHING_EAR_STICK(EarStickCoordinator.class), NOTHING_CMF_WATCH_PRO(CmfWatchProCoordinator.class), + NOTHING_CMF_WATCH_PRO_2(CmfWatchPro2Coordinator.class), GALAXY_BUDS_PRO(GalaxyBudsProDeviceCoordinator.class), GALAXY_BUDS_LIVE(GalaxyBudsLiveDeviceCoordinator.class), GALAXY_BUDS(GalaxyBudsDeviceCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 49809f580..9fff5aad7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2179,6 +2179,7 @@ Nothing Ear (2) Nothing Ear (Stick) CMF Watch Pro + CMF Watch Pro 2 Galaxy Buds Galaxy Buds Live Galaxy Buds Pro