mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-23 07:51:11 +01:00
huawei: Add new gadget Huawei Watch D2
This commit is contained in:
parent
b595a1ad96
commit
175f4bf60c
@ -65,6 +65,7 @@ public final class HuaweiConstants {
|
|||||||
public static final String HU_BAND7_NAME = "huawei band 7-";
|
public static final String HU_BAND7_NAME = "huawei band 7-";
|
||||||
public static final String HU_BAND8_NAME = "huawei band 8-";
|
public static final String HU_BAND8_NAME = "huawei band 8-";
|
||||||
public static final String HU_BAND9_NAME = "huawei band 9-";
|
public static final String HU_BAND9_NAME = "huawei band 9-";
|
||||||
|
public static final String HU_WATCHD2_NAME = "huawei watch d2-";
|
||||||
public static final String HU_WATCHGT3_NAME = "huawei watch gt 3-";
|
public static final String HU_WATCHGT3_NAME = "huawei watch gt 3-";
|
||||||
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
||||||
public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-";
|
public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-";
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright (C) 2024 Vitalii Tomin
|
||||||
|
|
||||||
|
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.huaweiwatchd2;
|
||||||
|
|
||||||
|
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.model.DeviceType;
|
||||||
|
|
||||||
|
public class HuaweiWatchD2Coordinator extends HuaweiBRCoordinator {
|
||||||
|
@Override
|
||||||
|
public DeviceType getDeviceType() {
|
||||||
|
return DeviceType.HUAWEIWATCHD2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Pattern getSupportedDeviceName() {
|
||||||
|
return Pattern.compile("(" + HuaweiConstants.HU_WATCHD2_NAME + ").*", Pattern.CASE_INSENSITIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeviceNameResource() {
|
||||||
|
return R.string.devicetype_huawei_watchd2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsUnicodeEmojis() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -179,6 +179,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweibandaw70.Huawei
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweitalkbandb6.HuaweiTalkBandB6Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweitalkbandb6.HuaweiTalkBandB6Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatch3.HuaweiWatch3Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatch3.HuaweiWatch3Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatch4pro.HuaweiWatch4ProCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatch4pro.HuaweiWatch4ProCoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchd2.HuaweiWatchD2Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit.HuaweiWatchFitCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit.HuaweiWatchFitCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit2.HuaweiWatchFit2Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit2.HuaweiWatchFit2Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit3.HuaweiWatchFit3Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit3.HuaweiWatchFit3Coordinator;
|
||||||
@ -504,6 +505,7 @@ public enum DeviceType {
|
|||||||
HONORMAGICWATCH2(HonorMagicWatch2Coordinator.class),
|
HONORMAGICWATCH2(HonorMagicWatch2Coordinator.class),
|
||||||
HONORWATCHGS3(HonorWatchGS3Coordinator.class),
|
HONORWATCHGS3(HonorWatchGS3Coordinator.class),
|
||||||
HONORWATCHGSPRO(HonorWatchGSProCoordinator.class),
|
HONORWATCHGSPRO(HonorWatchGSProCoordinator.class),
|
||||||
|
HUAWEIWATCHD2(HuaweiWatchD2Coordinator.class),
|
||||||
HUAWEIWATCHGT3(HuaweiWatchGT3Coordinator.class),
|
HUAWEIWATCHGT3(HuaweiWatchGT3Coordinator.class),
|
||||||
HUAWEIWATCHGT4(HuaweiWatchGT4Coordinator.class),
|
HUAWEIWATCHGT4(HuaweiWatchGT4Coordinator.class),
|
||||||
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
|
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
|
||||||
|
@ -1844,6 +1844,7 @@
|
|||||||
<string name="devicetype_huawei_watchgt2">Huawei Watch GT 2 (Pro)</string>
|
<string name="devicetype_huawei_watchgt2">Huawei Watch GT 2 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watchgt2e">Huawei Watch GT 2e</string>
|
<string name="devicetype_huawei_watchgt2e">Huawei Watch GT 2e</string>
|
||||||
<string name="devicetype_huawei_talk_band_b6">Huawei Talk Band B6</string>
|
<string name="devicetype_huawei_talk_band_b6">Huawei Talk Band B6</string>
|
||||||
|
<string name="devicetype_huawei_watchd2">Huawei Watch D2</string>
|
||||||
<string name="devicetype_huawei_watchgt3">Huawei Watch GT 3 (Pro)</string>
|
<string name="devicetype_huawei_watchgt3">Huawei Watch GT 3 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watchgt4">Huawei Watch GT 4</string>
|
<string name="devicetype_huawei_watchgt4">Huawei Watch GT 4</string>
|
||||||
<string name="devicetype_huawei_watchgt5">Huawei Watch GT 5 (Pro)</string>
|
<string name="devicetype_huawei_watchgt5">Huawei Watch GT 5 (Pro)</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user