mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Recoginze "Xiaomi Band 3" as Mi Band 3
When running newer Firmwares (since 2.2.0.12) it is possible that devics name themselves "Xiaomi Band 3". After a factory reset? Related to target market? Closes #1517
This commit is contained in:
@@ -47,6 +47,7 @@ public class HuamiConst {
|
|||||||
public static final String MI_BAND2_NAME = "MI Band 2";
|
public static final String MI_BAND2_NAME = "MI Band 2";
|
||||||
public static final String MI_BAND2_NAME_HRX = "Mi Band HRX";
|
public static final String MI_BAND2_NAME_HRX = "Mi Band HRX";
|
||||||
public static final String MI_BAND3_NAME = "Mi Band 3";
|
public static final String MI_BAND3_NAME = "Mi Band 3";
|
||||||
|
public static final String MI_BAND3_NAME_2 = "Xiaomi Band 3";
|
||||||
|
|
||||||
public static final String PREF_ACTIVATE_DISPLAY_ON_LIFT = "activate_display_on_lift_wrist";
|
public static final String PREF_ACTIVATE_DISPLAY_ON_LIFT = "activate_display_on_lift_wrist";
|
||||||
public static final String PREF_DISPLAY_ON_LIFT_START = "display_on_lift_start";
|
public static final String PREF_DISPLAY_ON_LIFT_START = "display_on_lift_start";
|
||||||
|
@@ -52,7 +52,7 @@ public class MiBand3Coordinator extends HuamiCoordinator {
|
|||||||
try {
|
try {
|
||||||
BluetoothDevice device = candidate.getDevice();
|
BluetoothDevice device = candidate.getDevice();
|
||||||
String name = device.getName();
|
String name = device.getName();
|
||||||
if (name != null && name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME)) {
|
if (name != null && (name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME) || name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME_2))) {
|
||||||
return DeviceType.MIBAND3;
|
return DeviceType.MIBAND3;
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Reference in New Issue
Block a user