diff --git a/CHANGELOG.md b/CHANGELOG.md index d54cb55..358d93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ V3.2.0 - (NEXT VERSION!) - Added neural network based data analysis. + V3.1.5 - 27apr2919 + - Fixed crash of MainActivity when server shutdown. + V3.1.4 - 25apr2019 - Added a periodic 'Beep' during the SMS timer to alert the user that an SMS is about to be sent. diff --git a/app/release/app-release-3.1.5.apk b/app/release/app-release-3.1.5.apk new file mode 100644 index 0000000..3503e78 Binary files /dev/null and b/app/release/app-release-3.1.5.apk differ diff --git a/app/release/output.json b/app/release/output.json index bfcd197..b96d8b2 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":58,"versionName":"3.1.4","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":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 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 567fe1c..1999879 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/MainActivity.java b/app/src/main/java/uk/org/openseizuredetector/MainActivity.java index e02e793..63460a8 100644 --- a/app/src/main/java/uk/org/openseizuredetector/MainActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/MainActivity.java @@ -366,7 +366,7 @@ public class MainActivity extends AppCompatActivity { */ final Runnable serverStatusRunnable = new Runnable() { public void run() { - Log.v(TAG,"serverStatusRunnable()"); + Log.v(TAG, "serverStatusRunnable()"); TextView tv; if (mUtil.isServerRunning()) { @@ -434,7 +434,7 @@ public class MainActivity extends AppCompatActivity { // Pebble Connected Phrase - use for HR if active instead. tv = (TextView) findViewById(R.id.pebbleTv); if (mConnection.mSdServer.mSdData.mHRAlarmActive) { - tv.setText("HR = "+mConnection.mSdServer.mSdData.mHR); + tv.setText("HR = " + mConnection.mSdServer.mSdData.mHR); if (!mConnection.mSdServer.mSdData.mHRAlarmStanding) { tv.setBackgroundColor(okColour); tv.setTextColor(okTextColour); @@ -534,7 +534,6 @@ public class MainActivity extends AppCompatActivity { pb.setProgressDrawable(pbDrawable); - // Fault Conditions - We override the values in the UI because we do not know // if the stored ones are correct or not with a fault present. if ((mConnection.mSdServer.mSdData.alarmState == 4) || @@ -614,24 +613,29 @@ public class MainActivity extends AppCompatActivity { // deal with latch alarms button Button acceptAlarmButton = (Button) findViewById(R.id.acceptAlarmButton); - if ((mConnection.mSdServer.mSmsTimer != null) - && (mConnection.mSdServer.mSmsTimer.mTimeLeft > 0 )){ - acceptAlarmButton.setText("SMS Will Be Sent in "+ - mConnection.mSdServer.mSmsTimer.mTimeLeft/1000 + - " s - CANCEL?"); - acceptAlarmButton.setBackgroundColor(alarmColour); - acceptAlarmButton.setEnabled(true); - + if (mConnection.mBound) { + if ((mConnection.mSdServer.mSmsTimer != null) + && (mConnection.mSdServer.mSmsTimer.mTimeLeft > 0)) { + acceptAlarmButton.setText("SMS Will Be Sent in " + + mConnection.mSdServer.mSmsTimer.mTimeLeft / 1000 + + " s - CANCEL?"); + acceptAlarmButton.setBackgroundColor(alarmColour); + acceptAlarmButton.setEnabled(true); + } else { + acceptAlarmButton.setText("Accept Alarm"); + acceptAlarmButton.setBackgroundColor(Color.DKGRAY); + if (mConnection.mBound) + if ((mConnection.mSdServer.isLatchAlarms()) + || mConnection.mSdServer.mSdData.mFallActive) { + acceptAlarmButton.setEnabled(true); + } else { + acceptAlarmButton.setEnabled(false); + } + } } else { acceptAlarmButton.setText("Accept Alarm"); acceptAlarmButton.setBackgroundColor(Color.DKGRAY); - if (mConnection.mBound) - if ((mConnection.mSdServer.isLatchAlarms()) - || mConnection.mSdServer.mSdData.mFallActive) { - acceptAlarmButton.setEnabled(true); - } else { - acceptAlarmButton.setEnabled(false); - } + acceptAlarmButton.setEnabled(false); } // Deal with Cancel Audible button diff --git a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java index 09dbeda..e603edf 100644 --- a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java @@ -503,7 +503,7 @@ public class StartupActivity extends Activity { + "\n\nChanges in this version:" + "\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.4 - Added repeat alarm beeps during SMS delay to alert user.." + + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.." ); // This makes the links display as links, but they do not respond to clicks for some reason... Linkify.addLinks(s, Linkify.ALL); @@ -535,7 +535,7 @@ public class StartupActivity extends Activity { + "\n\nChanges in this version:" + "\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.4 - Added repeat alarm beeps during SMS delay to alert user.." + + "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.." + "\n " ); // This makes the links display as links, but they do not respond to clicks for some reason...