Blackview R3Max: Initial support

This commit is contained in:
José Rebelo
2026-06-20 22:44:11 +01:00
parent 08aebb1e51
commit 736db41b40
4 changed files with 54 additions and 0 deletions
@@ -0,0 +1,50 @@
/* 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.gloryfit.watches
import nodomain.freeyourgadget.gadgetbridge.R
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.GloryFitCoordinator
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice
import java.util.regex.Pattern
class BlackviewR3MaxCoordinator : GloryFitCoordinator() {
override fun isExperimental(): Boolean {
return true
}
override fun getManufacturer(): String {
return "Blackview"
}
override fun getSupportedDeviceName(): Pattern? {
return Pattern.compile("^R3Max\\(ID-[0-9A-F]{4}\\)$")
}
override fun getDeviceNameResource(): Int {
return R.string.devicetype_blackview_r3max
}
override fun getBondingStyle(): Int {
// Watches without calls fail to pair
return BONDING_STYLE_NONE
}
override fun getContactsSlotCount(device: GBDevice): Int {
// No phone calls / contacts
return 0
}
}
@@ -186,6 +186,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivosport.Gar
import nodomain.freeyourgadget.gadgetbridge.devices.generic_headphones.GenericHeadphonesCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.generic_hr.GenericHeartRateCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.generic_scale.GenericWeightScaleCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.BlackviewR3MaxCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.D3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.DotnP66DCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.HaylouWatch2ProCoordinator;
@@ -909,6 +910,7 @@ public enum DeviceType {
OPPO_ENCO_AIR2(OppoEncoAir2Coordinator.class),
OPPO_ENCO_BUDS2(OppoEncoBuds2Coordinator.class),
OUKITEL_BT103(OukitelBT103Coordinator.class),
BLACKVIEW_R3MAX(BlackviewR3MaxCoordinator.class),
DOTN_P66D(DotnP66DCoordinator.class),
QECNATO_S10(QecnatoS10Coordinator.class),
R1(R1Coordinator.class),
+1
View File
@@ -4689,6 +4689,7 @@
<string name="devicetype_r1" translatable="false">R1</string>
<string name="devicetype_haylou_watch_2_pro" translatable="false">Haylou Watch 2 Pro</string>
<string name="devicetype_dotn_p66d" translatable="false">Dotn P66D</string>
<string name="devicetype_blackview_r3max" translatable="false">Blackview R3Max</string>
<string name="devicetype_qecnato_s10" translatable="false">Qecnato S10</string>
<string name="pref_title_time_interval">Time interval</string>
<string name="pref_summary_time_interval">Restrict to specific intervals</string>
@@ -45,6 +45,7 @@ public class BluetoothNameTest extends TestBase {
put("Y6(ID-28A8)", DeviceType.Y6); // #3949
put("Y66(ID-AB01)", DeviceType.Y66);
put("D3(ID-417F)", DeviceType.D3);
put("R3Max(ID-FC45)", DeviceType.BLACKVIEW_R3MAX); // matrix
put("S10", DeviceType.QECNATO_S10);
put("S52", DeviceType.S52);
put("ZL02D", DeviceType.ZL02D);