Added button in settings to select BLE device. Note may have broken theme so UI looks odd - actionbar may be missing...

This commit is contained in:
Graham Jones
2020-08-08 21:31:34 +01:00
parent 3d9d47a757
commit 7e2dce8c67
12 changed files with 499 additions and 28 deletions

View File

@@ -8,6 +8,12 @@
android:entryValues="@array/datasource_list_values"
android:defaultValue="Pebble"
android:dialogTitle="Select Data Source" />
<Preference
android:key="SelectBLEDevice"
android:title="@string/select_ble_device_title"
android:summary="@string/select_ble_device_desc"
android:widgetLayout="@layout/pref_select_ble_device_button"
/>
<CheckBoxPreference
android:defaultValue="true"
android:key="LogAlarms"

View File

@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The ListPreference data is defined in pebble_datasource_values.xml -->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<?xml version="1.0" encoding="utf-8"?><!-- The ListPreference data is defined in pebble_datasource_values.xml -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="BLE Device Settings">
<EditTextPreference
android:defaultValue=""
android:key="BLE_Device_Addr"
android:summary="MAC Address of BLE Data Source Device"
android:title="Device Address" />
<EditTextPreference
android:defaultValue=""
android:key="BLE_Device_Name"
android:summary="Name of BLE Data Source Device"
android:title="Device Address" />
</PreferenceCategory>
<PreferenceCategory android:title="User Interface Settings">
<EditTextPreference
android:defaultValue="5"
@@ -58,23 +68,22 @@
android:summary="Period (in seconds) between data analyses"
android:title="SamplePeriod (sec)" />
<ListPreference
android:key="PebbleSdMode"
android:title="Seizure Detector Mode"
android:summary="Select one of the three available modes of operation."
android:defaultValue="0"
android:dialogTitle="Select Seizure Detector Mode"
android:entries="@array/pebble_sd_mode_list"
android:entryValues="@array/pebble_sd_mode_list_values"
android:defaultValue="0"
android:dialogTitle="Select Seizure Detector Mode" />
android:key="PebbleSdMode"
android:summary="Select one of the three available modes of operation."
android:title="Seizure Detector Mode" />
<ListPreference
android:key="SampleFreq"
android:title="Select Sample Frequency"
android:summary="Higher Frequency is more Accurate, but uses more battery power."
android:entries="@array/pebble_sample_freq_list"
android:entryValues="@array/pebble_sample_freq_list_values"
android:defaultValue="100"
android:dialogTitle="Select Sample Frequency"
android:enabled="true"
/>
android:entries="@array/pebble_sample_freq_list"
android:entryValues="@array/pebble_sample_freq_list_values"
android:key="SampleFreq"
android:summary="Higher Frequency is more Accurate, but uses more battery power."
android:title="Select Sample Frequency" />
</PreferenceCategory>
@@ -102,16 +111,15 @@
android:title="Fall Detection Window (milli-seconds)" />
</PreferenceCategory>
<PreferenceCategory
android:title="Watch Communications Settings">
<PreferenceCategory android:title="Watch Communications Settings">
<ListPreference
android:key="PebbleDebug"
android:title="Seizure Detector Debug Mode"
android:summary="Set Debug mode on or off."
android:defaultValue="0"
android:dialogTitle="Select Debug Mode"
android:entries="@array/pebble_debug_list"
android:entryValues="@array/pebble_debug_values"
android:defaultValue="0"
android:dialogTitle="Select Debug Mode" />
android:key="PebbleDebug"
android:summary="Set Debug mode on or off."
android:title="Seizure Detector Debug Mode" />
<EditTextPreference
android:defaultValue="10"
android:key="AppRestartTimeout"