1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-23 17:17:46 +01: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:
Andreas Shimokawa 2019-05-18 21:03:07 +02:00
parent dd067eddd7
commit 6b72292812
2 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ public class HuamiConst {
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_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_DISPLAY_ON_LIFT_START = "display_on_lift_start";

View File

@ -52,7 +52,7 @@ public class MiBand3Coordinator extends HuamiCoordinator {
try {
BluetoothDevice device = candidate.getDevice();
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;
}
} catch (Exception ex) {