diff --git a/android_app/app/src/main/java/com/health/openscale/core/OpenScale.java b/android_app/app/src/main/java/com/health/openscale/core/OpenScale.java
index 4453573c..516086f5 100644
--- a/android_app/app/src/main/java/com/health/openscale/core/OpenScale.java
+++ b/android_app/app/src/main/java/com/health/openscale/core/OpenScale.java
@@ -27,6 +27,7 @@ import com.health.openscale.core.alarm.AlarmHandler;
import com.health.openscale.core.bluetooth.BluetoothCommunication;
import com.health.openscale.core.bluetooth.BluetoothCustomOpenScale;
import com.health.openscale.core.bluetooth.BluetoothMiScale;
+import com.health.openscale.core.bluetooth.BluetoothSanitasSbf70;
import com.health.openscale.core.database.ScaleDatabase;
import com.health.openscale.core.database.ScaleUserDatabase;
import com.health.openscale.core.datatypes.ScaleData;
@@ -48,6 +49,7 @@ import java.util.TreeMap;
import static com.health.openscale.core.bluetooth.BluetoothCommunication.BT_MI_SCALE;
import static com.health.openscale.core.bluetooth.BluetoothCommunication.BT_OPEN_SCALE;
+import static com.health.openscale.core.bluetooth.BluetoothCommunication.BT_SANITAS_SBF70;
public class OpenScale {
@@ -299,7 +301,6 @@ public class OpenScale {
csvWriter.append("\n");
}
-
csvWriter.close();
outputStream.close();
}
@@ -341,6 +342,9 @@ public class OpenScale {
case BT_OPEN_SCALE:
btCom = new BluetoothCustomOpenScale();
break;
+ case BT_SANITAS_SBF70:
+ btCom = new BluetoothSanitasSbf70(context);
+ break;
default:
Log.e("OpenScale", "No valid scale type selected");
return;
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 f5c502b4..a970e079 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
@@ -22,6 +22,7 @@ import android.os.Handler;
public abstract class BluetoothCommunication {
public static final int BT_MI_SCALE = 0;
public static final int BT_OPEN_SCALE = 1;
+ public static final int BT_SANITAS_SBF70 = 2;
public static final int BT_RETRIEVE_SCALE_DATA = 0;
public static final int BT_INIT_PROCESS = 1;
diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothSanitasSbf70.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothSanitasSbf70.java
new file mode 100644
index 00000000..79538e06
--- /dev/null
+++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothSanitasSbf70.java
@@ -0,0 +1,24 @@
+package com.health.openscale.core.bluetooth;
+
+import android.content.Context;
+
+/**
+ * Created by jflesch on 30/04/17.
+ */
+
+public class BluetoothSanitasSbf70 extends BluetoothCommunication {
+
+ public BluetoothSanitasSbf70(Context con) {
+
+ }
+
+ @Override
+ public void startSearching(String deviceName) {
+
+ }
+
+ @Override
+ public void stopSearching() {
+
+ }
+}
diff --git a/android_app/app/src/main/java/com/health/openscale/gui/MainActivity.java b/android_app/app/src/main/java/com/health/openscale/gui/MainActivity.java
index 8f725f86..ac4d89a9 100644
--- a/android_app/app/src/main/java/com/health/openscale/gui/MainActivity.java
+++ b/android_app/app/src/main/java/com/health/openscale/gui/MainActivity.java
@@ -187,7 +187,8 @@ public class MainActivity extends ActionBarActivity implements
String deviceType = prefs.getString("btDeviceTypes", "0");
// Check if Bluetooth 4.x is available
- if (Integer.parseInt(deviceType) == BluetoothCommunication.BT_MI_SCALE) {
+ if (Integer.parseInt(deviceType) == BluetoothCommunication.BT_MI_SCALE
+ || Integer.parseInt(deviceType) == BluetoothCommunication.BT_SANITAS_SBF70) {
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
setBluetoothStatusIcon(R.drawable.bluetooth_disabled);
Toast.makeText(getApplicationContext(), "Bluetooth 4.x " + getResources().getString(R.string.info_is_not_available), Toast.LENGTH_SHORT).show();
diff --git a/android_app/app/src/main/res/values/type_btdevices.xml b/android_app/app/src/main/res/values/type_btdevices.xml
index 32669753..d602a9a7 100644
--- a/android_app/app/src/main/res/values/type_btdevices.xml
+++ b/android_app/app/src/main/res/values/type_btdevices.xml
@@ -3,10 +3,12 @@
- Xiaomi Mi Scale v1
- openScale Custom Scale
+ - Sanitas SBF-70
- 0
- 1
+ - 2
\ No newline at end of file