mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Redmi Watch Move: Initial support
This commit is contained in:
+69
@@ -0,0 +1,69 @@
|
||||
/* Copyright (C) 2026 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.xiaomi.watches;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.XiaomiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class RedmiWatchMoveCoordinator extends XiaomiCoordinator {
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_redmi_watch_move;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturer() {
|
||||
return "Redmi";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("^Move$");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionType getConnectionType() {
|
||||
// this device likely supports both connection types if we indicate
|
||||
// that we are an iOS device in the final auth step
|
||||
return ConnectionType.BT_CLASSIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultIconResource() {
|
||||
return R.drawable.ic_device_amazfit_bip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWorldClocksSlotCount() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getContactsSlotCount(final GBDevice device) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||
return DeviceKind.WATCH;
|
||||
}
|
||||
}
|
||||
@@ -464,6 +464,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch4Co
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5ActiveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatch5LiteCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.RedmiWatchMoveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1ActiveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1ProCoordinator;
|
||||
@@ -562,6 +563,7 @@ public enum DeviceType {
|
||||
REDMIWATCH5(RedmiWatch5Coordinator.class),
|
||||
REDMIWATCH5ACTIVE(RedmiWatch5ActiveCoordinator.class),
|
||||
REDMIWATCH5LITE(RedmiWatch5LiteCoordinator.class),
|
||||
REDMIWATCHMOVE(RedmiWatchMoveCoordinator.class),
|
||||
XIAOMI_WATCH_S1_ACTIVE(XiaomiWatchS1ActiveCoordinator.class),
|
||||
XIAOMI_WATCH_S1_PRO(XiaomiWatchS1ProCoordinator.class),
|
||||
XIAOMI_WATCH_S1(XiaomiWatchS1Coordinator.class),
|
||||
|
||||
@@ -2213,6 +2213,7 @@
|
||||
<string name="devicetype_redmi_watch_5" translatable="false">Redmi Watch 5</string>
|
||||
<string name="devicetype_redmi_watch_5_active" translatable="false">Redmi Watch 5 Active</string>
|
||||
<string name="devicetype_redmi_watch_5_lite" translatable="false">Redmi Watch 5 Lite</string>
|
||||
<string name="devicetype_redmi_watch_move" translatable="false">Redmi Watch Move</string>
|
||||
<string name="devicetype_aawireless" translatable="false">AAWireless</string>
|
||||
<string name="devicetype_yawell_r05" translatable="false">Yawell R05</string>
|
||||
<string name="devicetype_yawell_r10" translatable="false">Yawell R10</string>
|
||||
|
||||
Reference in New Issue
Block a user