diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java
index 99bf26045..12115a0b4 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java
@@ -415,7 +415,7 @@ public class BluetoothCommunicationService extends Service {
private boolean mQuit = false;
private boolean mmIsConnected = false;
private int mmConnectionAttempts = 0;
-
+
public PebbleIoThread(String btDeviceAddress) {
super(btDeviceAddress);
}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java
index daa65f72d..26db979a3 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java
@@ -181,6 +181,13 @@ public class ControlCenter extends Activity {
}
deviceList.add(new GBDevice(device.getAddress(), device.getName(), deviceType));
}
+
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+ String miAddr = sharedPrefs.getString("development_miaddr", null);
+ if (miAddr != null && !miAddr.equals("")) {
+ deviceList.add(new GBDevice(miAddr, "MI", GBDevice.Type.MIBAND));
+ }
+
if (!deviceList.isEmpty()) {
hintTextView.setText("tap a device to connect");
}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SettingsActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SettingsActivity.java
index f6583101f..c68edd367 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SettingsActivity.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SettingsActivity.java
@@ -43,10 +43,16 @@ public class SettingsActivity extends PreferenceActivity {
}
});
+ // Add 'development' preferences, and a corresponding header.
+ PreferenceCategory fakeHeaderDev = new PreferenceCategory(this);
+ fakeHeaderDev.setTitle(R.string.pref_header_development);
+ getPreferenceScreen().addPreference(fakeHeaderDev);
+ addPreferencesFromResource(R.xml.pref_development);
+
// Bind the summaries of EditText/List/Dialog/Ringtone preferences to
// their values. When their values change, their summaries are updated
// to reflect the new value, per the Android Design guidelines.
- //bindPreferenceSummaryToValue(findPreference("notifications_sms"));
+ bindPreferenceSummaryToValue(findPreference("development_miaddr"));
//bindPreferenceSummaryToValue(findPreference("notifications_sms_whenscreenon"));
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 50a3d326c..f9febebd6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -31,4 +31,7 @@
Notification for K9-Mail
Generic notification support
… also when screen is on
+
+ Developer Options
+ Miband address
diff --git a/app/src/main/res/xml/pref_development.xml b/app/src/main/res/xml/pref_development.xml
new file mode 100644
index 000000000..0aeedf645
--- /dev/null
+++ b/app/src/main/res/xml/pref_development.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file