mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei Watch GT 6 (Pro): Experimental support
This commit is contained in:
+2
@@ -84,6 +84,8 @@ public final class HuaweiConstants {
|
||||
public static final String HU_WATCHGT4_NAME = "huawei watch gt 4-";
|
||||
public static final String HU_WATCHGT5_NAME = "huawei watch gt 5-";
|
||||
public static final String HU_WATCHGT5PRO_NAME = "huawei watch gt 5 pro-";
|
||||
public static final String HU_WATCHGT6_NAME = "huawei watch gt 6-";
|
||||
public static final String HU_WATCHGT6PRO_NAME = "huawei watch gt 6 pro-";
|
||||
public static final String HU_WATCHFIT_NAME = "huawei watch fit-";
|
||||
public static final String HU_WATCHFIT2_NAME = "huawei watch fit 2-";
|
||||
public static final String HU_WATCHFIT3_NAME = "huawei watch fit 3-";
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/* Copyright (C) 2025 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 <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt6;
|
||||
|
||||
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;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class HuaweiWatchGT6Coordinator extends HuaweiBRCoordinator {
|
||||
@Override
|
||||
public boolean isExperimental() {
|
||||
// #5428 - untested
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.HUAWEIWATCHGT5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("(" + HuaweiConstants.HU_WATCHGT6_NAME + "|" + HuaweiConstants.HU_WATCHGT6PRO_NAME + ").*", Pattern.CASE_INSENSITIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_huawei_watchgt5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
// HarmonyOS watch
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||
return DeviceKind.WATCH;
|
||||
}
|
||||
}
|
||||
@@ -260,6 +260,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt2e.Huawe
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt3.HuaweiWatchGT3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt4.HuaweiWatchGT4Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt5.HuaweiWatchGT5Coordinator;
|
||||
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.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
|
||||
@@ -721,6 +722,7 @@ public enum DeviceType {
|
||||
HUAWEIWATCHGT3(HuaweiWatchGT3Coordinator.class),
|
||||
HUAWEIWATCHGT4(HuaweiWatchGT4Coordinator.class),
|
||||
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
|
||||
HUAWEIWATCHGT6(HuaweiWatchGT6Coordinator.class),
|
||||
HUAWEIWATCHGTRUNNER(HuaweiWatchGTRunnerCoordinator.class),
|
||||
HUAWEIWATCHGTCYBER(HuaweiWatchGTCyberCoordinator.class),
|
||||
HUAWEIBAND8(HuaweiBand8Coordinator.class),
|
||||
|
||||
+1
@@ -717,6 +717,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
if (createSupport) {
|
||||
LOG.debug("connectToDevice - {} create new device support", deviceAddress);
|
||||
deviceSupport = mFactory.createDeviceSupport(gbDevice);
|
||||
LOG.debug("connectToDevice - created {} for {}", deviceSupport != null ? deviceSupport.getClass().getSimpleName() : "(null)", deviceAddress);
|
||||
registeredStruct.setDeviceSupport(deviceSupport);
|
||||
}
|
||||
|
||||
|
||||
@@ -2071,6 +2071,7 @@
|
||||
<string name="devicetype_huawei_watchgt3" translatable="false">Huawei Watch GT 3 (Pro)</string>
|
||||
<string name="devicetype_huawei_watchgt4" translatable="false">Huawei Watch GT 4</string>
|
||||
<string name="devicetype_huawei_watchgt5" translatable="false">Huawei Watch GT 5 (Pro)</string>
|
||||
<string name="devicetype_huawei_watchgt6" translatable="false">Huawei Watch GT 6 (Pro)</string>
|
||||
<string name="devicetype_huawei_watchgtrunner" translatable="false">Huawei Watch GT Runner</string>
|
||||
<string name="devicetype_huawei_watchgtcyber" translatable="false">Huawei Watch GT Cyber</string>
|
||||
<string name="devicetype_huawei_watchfit" translatable="false">Huawei Watch Fit</string>
|
||||
|
||||
Reference in New Issue
Block a user