diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiConst.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiConst.java index bb52ea090..c5c3a4dc5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiConst.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiConst.java @@ -70,6 +70,7 @@ public class HuamiConst { public static final String AMAZFIT_GTR4_NAME = "Amazfit GTR 4"; public static final String AMAZFIT_GTR_MINI_NAME = "Amazfit GTR Mini"; public static final String AMAZFIT_TREX_2_NAME = "Amazfit T-Rex 2"; + public static final String AMAZFIT_TREX_3_NAME = "Amazfit T-Rex 3"; public static final String AMAZFIT_TREX_ULTRA = "Amazfit T-Rex Ultra"; public static final String AMAZFIT_CHEETAH_PRO_NAME = "Amazfit Cheetah Pro"; public static final String AMAZFIT_CHEETAH_SQUARE_NAME = "Amazfit Cheetah S"; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex3/AmazfitTRex3Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex3/AmazfitTRex3Coordinator.java new file mode 100644 index 000000000..38138ece9 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex3/AmazfitTRex3Coordinator.java @@ -0,0 +1,92 @@ +/* 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.huami.amazfittrex3; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst; +import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator; +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; + +public class AmazfitTRex3Coordinator extends ZeppOsCoordinator { + @Override + public boolean isExperimental() { + // Untested device + return true; + } + + @Override + public String getDeviceBluetoothName() { + return HuamiConst.AMAZFIT_TREX_3_NAME; + } + + @Override + public Set getDeviceSources() { + return new HashSet<>(Arrays.asList( + 8716544, + 8716545, // chinese mainland version + 8716547 // chinese mainland version + )); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_amazfit_trex_3; + } + + @Override + public boolean supportsContinuousFindDevice() { + return true; + } + + @Override + public boolean mainMenuHasMoreSection() { + return true; + } + + @Override + public boolean supportsGpxUploads() { + return true; + } + + @Override + public boolean supportsControlCenter() { + return true; + } + + @Override + public boolean supportsToDoList() { + return true; + } + + @Override + public boolean supportsWifiHotspot(final GBDevice device) { + return true; + } + + @Override + public boolean supportsFtpServer(final GBDevice device) { + return true; + } + + public boolean supportsBluetoothPhoneCalls(final GBDevice device) { + return true; + } +} 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 428ca732a..630b7f764 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -141,6 +141,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitpop.AmazfitPopC import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitpoppro.AmazfitPopProCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex.AmazfitTRexCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex2.AmazfitTRex2Coordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex3.AmazfitTRex3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexpro.AmazfitTRexProCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexultra.AmazfitTRexUltraCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitvergel.AmazfitVergeLCoordinator; @@ -333,6 +334,7 @@ public enum DeviceType { AMAZFITGTS4(AmazfitGTS4Coordinator.class), AMAZFITGTS4MINI(AmazfitGTS4MiniCoordinator.class), AMAZFITTREX2(AmazfitTRex2Coordinator.class), + AMAZFITTREX3(AmazfitTRex3Coordinator.class), AMAZFITGTR3PRO(AmazfitGTR3ProCoordinator.class), AMAZFITBIP3(AmazfitBip3Coordinator.class), AMAZFITBIP3PRO(AmazfitBip3ProCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a35da6c2b..73416b656 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1677,6 +1677,7 @@ Amazfit Bip 5 Unity Amazfit GTR 4 Amazfit T-Rex 2 + Amazfit T-Rex 3 Amazfit T-Rex Ultra Amazfit Band 5 Amazfit Band 7