Updated first-run message to show what has changed.
This commit is contained in:
@@ -85,6 +85,8 @@ public abstract class SdDataSource {
|
||||
|
||||
public void startPebbleApp() { Log.v(TAG,"startPebbleApp()"); }
|
||||
|
||||
public void acceptAlarm() { Log.v(TAG,"acceptAlarm()"); }
|
||||
|
||||
/**
|
||||
* Display a Toast message on screen.
|
||||
* @param msg - message to display.
|
||||
|
||||
@@ -155,6 +155,42 @@ public class SdDataSourceNetwork extends SdDataSource {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrive the current Seizure Detector Data from the server.
|
||||
* Uses the DownloadSdDataTask class to download the data in the
|
||||
* background. The data is processed in DownloadSdDataTask.onPostExecute().
|
||||
*/
|
||||
@Override
|
||||
public void acceptAlarm() {
|
||||
Log.v(TAG, "acceptAlarm()");
|
||||
new AcceptAlarmTask().execute("http://" + mServerIP + ":8080/acceptalarm");
|
||||
}
|
||||
|
||||
private class AcceptAlarmTask extends AsyncTask<String, Void, String> {
|
||||
@Override
|
||||
protected String doInBackground(String... urls) {
|
||||
// params comes from the execute() call: params[0] is the url.
|
||||
try {
|
||||
String result = downloadUrl(urls[0]);
|
||||
if (result.startsWith("Unable to retrieve web page")) {
|
||||
Log.v(TAG,"doInBackground() - Error accepting alarm");
|
||||
} else {
|
||||
Log.v(TAG,"doInBackground(): Alarm Accepted");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.v(TAG,"doInBackground(): IOException - "+e.toString());
|
||||
}
|
||||
return "Done";
|
||||
}
|
||||
// onPostExecute displays the results of the AsyncTask.
|
||||
@Override
|
||||
protected void onPostExecute(String s) {
|
||||
Log.v(TAG,"onPostExecute() - s="+s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Given a URL, establishes an HttpUrlConnection and retrieves
|
||||
// the web page content as a InputStream, which it returns as
|
||||
// a string.
|
||||
|
||||
@@ -713,6 +713,7 @@ public class SdServer extends Service implements SdDataReceiver, SdLocationRecei
|
||||
Log.v(TAG, "acceptAlarm()");
|
||||
mSdData.alarmStanding = false;
|
||||
mSdData.fallAlarmStanding = false;
|
||||
mSdDataSource.acceptAlarm();
|
||||
stopLatchTimer();
|
||||
}
|
||||
|
||||
|
||||
@@ -461,10 +461,11 @@ public class StartupActivity extends Activity {
|
||||
+ "http://openseizuredetector.org.uk, or the app Facebook page at https://www.facebook.com/openseizuredetector. "
|
||||
+ "so I can get in touch if necessary.\nThank you! Graham \ngraham@openseizuredetector.org.uk "
|
||||
+ "\n\nChanges in this version:"
|
||||
+ "\n- Update to Detection Algorithm: You will need to increase the AlarmRatioThresh setting from the previous "
|
||||
+ "default of around 30 to a value of 50-60 to avoid excessive false alarms"
|
||||
+ "\n- Added GPS Location to SMS Alarms"
|
||||
+ "\n- Added auto-start on boot capability"
|
||||
+ "\n- Added an alarm latch automatic reset timer. This means that if you enable 'Latch Alarms'"
|
||||
+ "\n in the alarms settings then an alarm will stay active for a period set by the Latch Alarm"
|
||||
+ "\n Time Duration setting before it re-sets, even if the watch only detects an alarm condition"
|
||||
+ "\n for a short period. This is to make sure a carer is alerted to even a short duration alarm"
|
||||
+ "\n condition. The alarm can be reset manually by pressing the 'Accept Alarm' button."
|
||||
);
|
||||
// This makes the links display as links, but they do not respond to clicks for some reason...
|
||||
Linkify.addLinks(s, Linkify.ALL);
|
||||
|
||||
Reference in New Issue
Block a user