From 46dd45cb4eba7dd2dc3940dcba518479a6460d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Thu, 31 Oct 2024 23:47:20 +0000 Subject: [PATCH] Garmin Forerunner 235: Initial support --- .../GarminForerunner235Coordinator.java | 18 ++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 2 ++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 21 insertions(+) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner235Coordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner235Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner235Coordinator.java new file mode 100644 index 000000000..808567169 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner235Coordinator.java @@ -0,0 +1,18 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminForerunner235Coordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Forerunner 235$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_forerunner_235; + } +} 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 d4a237be4..9c29d048c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -68,6 +68,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminF import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix7SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix8Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner165Coordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner235Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner245Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner245MusicCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner255Coordinator; @@ -425,6 +426,7 @@ public enum DeviceType { GARMIN_FENIX_7_PRO(GarminFenix7ProCoordinator.class), GARMIN_FENIX_8(GarminFenix8Coordinator.class), GARMIN_FORERUNNER_165(GarminForerunner165Coordinator.class), + GARMIN_FORERUNNER_235(GarminForerunner235Coordinator.class), GARMIN_FORERUNNER_245(GarminForerunner245Coordinator.class), GARMIN_FORERUNNER_245_MUSIC(GarminForerunner245MusicCoordinator.class), GARMIN_FORERUNNER_255(GarminForerunner255Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 06ffde71f..714034049 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1751,6 +1751,7 @@ Garmin Instinct 2 SolTac Garmin Instinct Crossover Garmin Forerunner 165 + Garmin Forerunner 235 Garmin Forerunner 245 Garmin Forerunner 245 Music Garmin Forerunner 255