diff --git a/CHANGELOG.md b/CHANGELOG.md index 358d93f..3810607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ V3.2.0 - (NEXT VERSION!) - Added neural network based data analysis. + V3.1.6 - 27apr2919 + - Made the Cancel Audible button inhibit SMS alarms as well as audible beeps. + V3.1.5 - 27apr2919 - Fixed crash of MainActivity when server shutdown. diff --git a/app/release/app-release-3.1.6.apk b/app/release/app-release-3.1.6.apk new file mode 100644 index 0000000..e3d1f7a Binary files /dev/null and b/app/release/app-release-3.1.6.apk differ diff --git a/app/release/output.json b/app/release/output.json index b96d8b2..5706869 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":59,"versionName":"3.1.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":60,"versionName":"3.1.6","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1999879..e5ddfd3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ diff --git a/app/src/main/java/uk/org/openseizuredetector/SdServer.java b/app/src/main/java/uk/org/openseizuredetector/SdServer.java index 02e734b..4cb15b0 100644 --- a/app/src/main/java/uk/org/openseizuredetector/SdServer.java +++ b/app/src/main/java/uk/org/openseizuredetector/SdServer.java @@ -547,8 +547,15 @@ public class SdServer extends Service implements SdDataReceiver { > 60000) { sendSMSAlarm(); mSMSTime = tnow; + } else { + mUtil.showToast("SMS Alarm already sent - not re-sending"); + Log.v(TAG, "SMS Alarm already sent - not re-sending"); } + } else { + mUtil.showToast("mSMSAlarm is false - not sending"); + Log.v(TAG, "mSMSAlarm is false - not sending"); } + startLatchTimer(); } // Handle fall alarm @@ -576,8 +583,15 @@ public class SdServer extends Service implements SdDataReceiver { > 60000) { sendSMSAlarm(); mSMSTime = tnow; + } else { + mUtil.showToast("SMS Alarm already sent - not re-sending"); + Log.v(TAG, "SMS Alarm already sent - not re-sending"); } + } else { + mUtil.showToast("mSMSAlarm is false - not sending"); + Log.v(TAG, "mSMSAlarm is false - not sending"); } + } // Handle heart rate alarm if ((sdData.mHRAlarmActive) && (sdData.mHRAlarmStanding)) { @@ -603,7 +617,13 @@ public class SdServer extends Service implements SdDataReceiver { > 60000) { sendSMSAlarm(); mSMSTime = tnow; + } else { + mUtil.showToast("SMS Alarm already sent - not re-sending"); + Log.v(TAG, "SMS Alarm already sent - not re-sending"); } + } else { + mUtil.showToast("mSMSAlarm is false - not sending"); + Log.v(TAG, "mSMSAlarm is false - not sending"); } } @@ -733,23 +753,25 @@ public class SdServer extends Service implements SdDataReceiver { public void sendSMSAlarm() { AlertDialog ad; if (mSMSAlarm) { - if (!mUtil.areSMSPermissionsOK()) { - mUtil.showToast("ERROR - Permission for SMS or Location Denied - Not Sending SMS"); - Log.e(TAG,"ERROR - Permission for SMS or Location Denied - Not Sending SMS"); + if (!mCancelAudible) { + if (!mUtil.areSMSPermissionsOK()) { + mUtil.showToast("ERROR - Permission for SMS or Location Denied - Not Sending SMS"); + Log.e(TAG, "ERROR - Permission for SMS or Location Denied - Not Sending SMS"); + } else { + //mSMSAlertDialog = new AlertDialog.Builder(this); + //mSMSAlertDialog.setMessage("SMS Will be Sent in 10 Seconds, unless you press the Cancel Button") + // .setPositiveButton("Send", smsCancelClickListener) + // .setNegativeButton("Cancel", smsCancelClickListener); + //ad = mSMSAlertDialog.show(); + startSmsTimer(); + } } else { - //mSMSAlertDialog = new AlertDialog.Builder(this); - //mSMSAlertDialog.setMessage("SMS Will be Sent in 10 Seconds, unless you press the Cancel Button") - // .setPositiveButton("Send", smsCancelClickListener) - // .setNegativeButton("Cancel", smsCancelClickListener); - //ad = mSMSAlertDialog.show(); - startSmsTimer(); + Log.i(TAG, "sendSMSAlarm() - Cancel Audible Active - not sending SMS"); + mUtil.showToast("Cancel Audible Active - not sending SMS"); } } else { Log.i(TAG, "sendSMSAlarm() - SMS Alarms Disabled - not doing anything!"); - Toast toast = Toast.makeText(getApplicationContext(), - "SMS Alarms Disabled - not doing anything!", - Toast.LENGTH_SHORT); - toast.show(); + mUtil.showToast("SMS Alarms Disabled - not doing anything!"); } } @@ -1001,8 +1023,7 @@ public class SdServer extends Service implements SdDataReceiver { Log.v(TAG, "updatePrefs() - mLatchAlarmTimerPeriod = " + mLatchAlarmPeriod); } catch (Exception ex) { Log.v(TAG, "updatePrefs() - Problem with LatchAlarmTimerPeriod preference!"); - Toast toast = Toast.makeText(getApplicationContext(), "Problem Parsing LatchAlarmTimerPeriod Preference", Toast.LENGTH_SHORT); - toast.show(); + mUtil.showToast("Problem Parsing LatchAlarmTimerPeriod Preference"); } mAudibleFaultWarning = SP.getBoolean("AudibleFaultWarning", true); Log.v(TAG, "updatePrefs() - mAuidbleFaultWarning = " + mAudibleFaultWarning); @@ -1013,8 +1034,7 @@ public class SdServer extends Service implements SdDataReceiver { Log.v(TAG, "updatePrefs() - mFaultTimerPeriod = " + mFaultTimerPeriod); } catch (Exception ex) { Log.v(TAG, "updatePrefs() - Problem with FaultTimerPeriod preference!"); - Toast toast = Toast.makeText(getApplicationContext(), "Problem Parsing FaultTimerPeriod Preference", Toast.LENGTH_SHORT); - toast.show(); + mUtil.showToast("Problem Parsing FaultTimerPeriod Preference"); } mAudibleAlarm = SP.getBoolean("AudibleAlarm", true); @@ -1039,8 +1059,7 @@ public class SdServer extends Service implements SdDataReceiver { } catch (Exception ex) { Log.v(TAG, "updatePrefs() - Problem parsing preferences!"); mUtil.writeToSysLogFile("SdServer.updatePrefs() - Error " + ex.toString()); - Toast toast = Toast.makeText(getApplicationContext(), "Problem Parsing Preferences - Something won't work - Please go back to Settings and correct it!", Toast.LENGTH_SHORT); - toast.show(); + mUtil.showToast("Problem Parsing Preferences - Something won't work - Please go back to Settings and correct it!"); } } @@ -1211,10 +1230,7 @@ public class SdServer extends Service implements SdDataReceiver { } } else { Log.i(TAG, "sendSMSAlarm() - SMS Alarms Disabled - not doing anything!"); - Toast toast = Toast.makeText(getApplicationContext(), - "SMS Alarms Disabled - not doing anything!", - Toast.LENGTH_SHORT); - toast.show(); + mUtil.showToast("SMS Alarms Disabled - not doing anything!"); } } diff --git a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java index e603edf..ad93ee0 100644 --- a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java @@ -504,6 +504,7 @@ public class StartupActivity extends Activity { + "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source " + "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm." + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.." + + "\n V3.1.6 - Made Cancel Audible button inhibit sending SMS alarms as well as audible beeps" ); // This makes the links display as links, but they do not respond to clicks for some reason... Linkify.addLinks(s, Linkify.ALL); @@ -536,6 +537,7 @@ public class StartupActivity extends Activity { + "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source " + "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm." + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.." + + "\n V3.1.6 - Made Cancel Audible button inhibit sending SMS alarms as well as audible beeps" + "\n " ); // This makes the links display as links, but they do not respond to clicks for some reason...