v2.0.6 - stop watch app before starting to improve reliability
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="uk.org.openseizuredetector"
|
package="uk.org.openseizuredetector"
|
||||||
android:versionCode="26"
|
android:versionCode="27"
|
||||||
android:versionName="2.0.5">
|
android:versionName="2.0.6">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="14" />
|
<uses-sdk android:minSdkVersion="14" />
|
||||||
|
|
||||||
|
|||||||
@@ -469,9 +469,18 @@ public class SdDataSourcePebble extends SdDataSource {
|
|||||||
* Attempt to start the pebble_sd watch app on the pebble watch.
|
* Attempt to start the pebble_sd watch app on the pebble watch.
|
||||||
*/
|
*/
|
||||||
public void startWatchApp() {
|
public void startWatchApp() {
|
||||||
Log.v(TAG, "startWatchApp()");
|
Log.v(TAG, "startWatchApp() - closing app first");
|
||||||
|
// first close the watch app if it is running.
|
||||||
|
PebbleKit.closeAppOnPebble(mContext, SD_UUID);
|
||||||
|
// then start it after a 1 second delay.
|
||||||
|
final Handler handler = new Handler();
|
||||||
|
handler.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Log.v(TAG, "startWatchApp() - starting watch app...");
|
||||||
PebbleKit.startAppOnPebble(mContext, SD_UUID);
|
PebbleKit.startAppOnPebble(mContext, SD_UUID);
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="5"
|
android:defaultValue="5"
|
||||||
android:key="PebbleUpdatePeriod"
|
android:key="PebbleUpdatePeriod"
|
||||||
android:summary="Time period at which data is sent to the phone."
|
android:summary="Time period at which data is sent to the phone (increase value to reduce battery consumption)"
|
||||||
android:title="Data Period (sec)" />
|
android:title="Data Period (sec)" />
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="300"
|
android:defaultValue="300"
|
||||||
@@ -20,14 +20,6 @@
|
|||||||
android:title="Manual Alarm Period (sec)" />
|
android:title="Manual Alarm Period (sec)" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="Seizure Detector Settings">
|
<PreferenceCategory android:title="Seizure Detector Settings">
|
||||||
<ListPreference
|
|
||||||
android:key="PebbleDebug"
|
|
||||||
android:title="Seizure Detector Debug Mode"
|
|
||||||
android:summary="Set Debug mode on or off."
|
|
||||||
android:entries="@array/pebble_debug_list"
|
|
||||||
android:entryValues="@array/pebble_debug_values"
|
|
||||||
android:defaultValue="0"
|
|
||||||
android:dialogTitle="Select Debug Mode" />
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="PebbleDisplaySpectrum"
|
android:key="PebbleDisplaySpectrum"
|
||||||
android:title="Spectrum display Mode"
|
android:title="Spectrum display Mode"
|
||||||
@@ -51,7 +43,9 @@
|
|||||||
android:entries="@array/pebble_sample_freq_list"
|
android:entries="@array/pebble_sample_freq_list"
|
||||||
android:entryValues="@array/pebble_sample_freq_list_values"
|
android:entryValues="@array/pebble_sample_freq_list_values"
|
||||||
android:defaultValue="100"
|
android:defaultValue="100"
|
||||||
android:dialogTitle="Select Sample Frequency" />
|
android:dialogTitle="Select Sample Frequency"
|
||||||
|
android:enabled="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="3"
|
android:defaultValue="3"
|
||||||
@@ -110,6 +104,14 @@
|
|||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="Watch Communications Settings">
|
android:title="Watch Communications Settings">
|
||||||
|
<ListPreference
|
||||||
|
android:key="PebbleDebug"
|
||||||
|
android:title="Seizure Detector Debug Mode"
|
||||||
|
android:summary="Set Debug mode on or off."
|
||||||
|
android:entries="@array/pebble_debug_list"
|
||||||
|
android:entryValues="@array/pebble_debug_values"
|
||||||
|
android:defaultValue="0"
|
||||||
|
android:dialogTitle="Select Debug Mode" />
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="10"
|
android:defaultValue="10"
|
||||||
android:key="AppRestartTimeout"
|
android:key="AppRestartTimeout"
|
||||||
|
|||||||
Reference in New Issue
Block a user