diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothBroadcastScale.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothBroadcastScale.java index fcaf8c8b..0769551b 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothBroadcastScale.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothBroadcastScale.java @@ -52,6 +52,7 @@ public class BluetoothBroadcastScale extends BluetoothCommunication { public BluetoothBroadcastScale(Context context) { + super(context); this.context = context; this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper())); } diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java index 51aa0c57..86f2224f 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java @@ -80,10 +80,6 @@ public BluetoothCommunication(Context context) this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper())); } - public BluetoothCommunication() { - - } - protected boolean needReConnect() { if (callbackBtHandler == null) { return true; diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothFactory.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothFactory.java index 0a4aba56..1cee9735 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothFactory.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothFactory.java @@ -139,7 +139,7 @@ public static BluetoothCommunication createDeviceDriver(Context context, String if (deviceName.equals("Yoda1")){ return new BluetoothYoda1Scale(context); } - if (deviceName.equals("AAA002")){ + if (deviceName.equals("AAA002") || deviceName.equals("AAA007")){ return new BluetoothBroadcastScale(context); } return null;