diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4e7b3156d..a68761b1e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -95,6 +95,10 @@
android:name=".activities.charts.ChartsPreferencesActivity"
android:label="@string/activity_prefs_charts"
android:parentActivityName=".activities.charts.ChartsPreferencesActivity" />
+
. */
+package nodomain.freeyourgadget.gadgetbridge.activities;
+
+import android.os.Bundle;
+
+import nodomain.freeyourgadget.gadgetbridge.R;
+
+public class DiscoveryPairingPreferenceActivity extends AbstractSettingsActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.discovery_pairing_preferences);
+ }
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ }
+}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SettingsActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SettingsActivity.java
index 4c249c9ec..b8a590671 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SettingsActivity.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SettingsActivity.java
@@ -394,6 +394,15 @@ public class SettingsActivity extends AbstractSettingsActivity {
return true;
}
});
+ pref = findPreference("pref_discovery_pairing");
+ pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+ public boolean onPreferenceClick(Preference preference) {
+ Intent enableIntent = new Intent(SettingsActivity.this, DiscoveryPairingPreferenceActivity.class);
+ startActivity(enableIntent);
+ return true;
+ }
+ });
+
}
@Override
diff --git a/app/src/main/res/layout/activity_discovery.xml b/app/src/main/res/layout/activity_discovery.xml
index 331bc9e2e..58d4cabdd 100644
--- a/app/src/main/res/layout/activity_discovery.xml
+++ b/app/src/main/res/layout/activity_discovery.xml
@@ -89,5 +89,10 @@
android:textColor="@color/secondarytext"
android:textIsSelectable="true" />
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b28fbdafb..a2b39ad8a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -692,6 +692,7 @@
Enable left/right swipe in the charts activity
Show averages in the charts
Chart settings
+ Discovery and Pairing options
Max heart rate
Min heart rate
Charts Range
diff --git a/app/src/main/res/xml/discovery_pairing_preferences.xml b/app/src/main/res/xml/discovery_pairing_preferences.xml
new file mode 100644
index 000000000..d7eba907a
--- /dev/null
+++ b/app/src/main/res/xml/discovery_pairing_preferences.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 33a9ec8a7..6b930337c 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -376,29 +376,9 @@
android:layout="@layout/preference_checkbox"
android:summary="@string/pref_check_permission_status_summary"
android:title="@string/pref_check_permission_status" />
-
-
-
-
+
+