diff --git a/CHANGELOG.md b/CHANGELOG.md index 065ff7a..6ae2ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ V3.2.0 - (NEXT VERSION!) - Added neural network based data analysis. + V3.1.11 - 23oct2019 + - Updated network data source so it displays heart rate data if it is available. + V3.1.10 - 20oct2019 - Added option to make a 'null' heart rate reading an alarm rather than fault condition. diff --git a/app/release/app-release-3.1.11.apk b/app/release/app-release-3.1.11.apk new file mode 100644 index 0000000..6879215 Binary files /dev/null and b/app/release/app-release-3.1.11.apk differ diff --git a/app/release/output.json b/app/release/output.json index de822d9..8fb6c3d 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":64,"versionName":"3.1.10","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":65,"versionName":"3.1.11","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 18ae8e9..ebeda02 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ @@ -20,6 +20,7 @@ + @@ -28,7 +29,11 @@ + android:label="@string/app_name" + android:networkSecurityConfig="@xml/network_security_config" + > + + @@ -64,7 +69,6 @@ - diff --git a/app/src/main/java/uk/org/openseizuredetector/SdData.java b/app/src/main/java/uk/org/openseizuredetector/SdData.java index 38fb904..fd701e2 100644 --- a/app/src/main/java/uk/org/openseizuredetector/SdData.java +++ b/app/src/main/java/uk/org/openseizuredetector/SdData.java @@ -64,7 +64,7 @@ public class SdData implements Parcelable { public boolean mHRAlarmActive = false; public boolean mHRNullAsAlarm = false; public double mHRThreshMin = 40.0; - public double mHRTreshMax = 150.0; + public double mHRThreshMax = 150.0; public double rawData[]; int mNsamp = 0; @@ -120,7 +120,13 @@ public class SdData implements Parcelable { alarmPhrase = jo.optString("alarmPhrase"); alarmThresh = jo.optInt("alarmThresh"); alarmRatioThresh = jo.optInt("alarmRatioThresh"); + mHRAlarmActive=jo.optBoolean("hrAlarmActive"); + mHRThreshMin = jo.optDouble("hrThreshMin"); + mHRThreshMax = jo.optDouble("hrThreshMax"); mHR = jo.optDouble("hr"); + if (mHR>=0.0) { + mHRAlarmActive = true; + } JSONArray specArr = jo.optJSONArray("simpleSpec"); for (int i = 0; i < specArr.length(); i++) { simpleSpec[i] = specArr.optInt(i); @@ -169,6 +175,9 @@ public class SdData implements Parcelable { jsonObj.put("alarmFreqMax",alarmFreqMax); jsonObj.put("alarmThresh", alarmThresh); jsonObj.put("alarmRatioThresh", alarmRatioThresh); + jsonObj.put("hrAlarmActive", mHRAlarmActive); + jsonObj.put("hrThreshMin",mHRThreshMin); + jsonObj.put("hrThreshMax", mHRThreshMax); jsonObj.put("hr",mHR); JSONArray arr = new JSONArray(); for (int i = 0; i < simpleSpec.length; i++) { diff --git a/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java b/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java index 0038618..1c5b20e 100644 --- a/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java +++ b/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java @@ -330,8 +330,8 @@ public class SdDataSourceGarmin extends SdDataSource { Log.v(TAG, "updatePrefs() HRThreshMin = " + mSdData.mHRThreshMin); prefStr = SP.getString("HRThreshMax", "SET_FROM_XML"); - mSdData.mHRTreshMax = (short) Integer.parseInt(prefStr); - Log.v(TAG, "updatePrefs() HRThreshMax = " + mSdData.mHRTreshMax); + mSdData.mHRThreshMax = (short) Integer.parseInt(prefStr); + Log.v(TAG, "updatePrefs() HRThreshMax = " + mSdData.mHRThreshMax); } else { Log.v(TAG, "updatePrefs() - prefStr is null - WHY????"); @@ -590,7 +590,7 @@ public class SdDataSourceGarmin extends SdDataSource { mSdData.mHRAlarmStanding = false; } } - else if ((mSdData.mHR > mSdData.mHRTreshMax) || (mSdData.mHR < mSdData.mHRThreshMin)) { + else if ((mSdData.mHR > mSdData.mHRThreshMax) || (mSdData.mHR < mSdData.mHRThreshMin)) { Log.i(TAG, "Heart Rate Abnormal - " + mSdData.mHR + " bpm"); mSdData.mHRFaultStanding = false; mSdData.mHRAlarmStanding = true; diff --git a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java index c8ac504..cb3dca4 100644 --- a/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/StartupActivity.java @@ -408,13 +408,9 @@ 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- 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 V3.1.8 - Added READ_PHONE_STATE permission, which seems to be needed for some phones" - + "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active" + + "\n V3.1.11 - Fixed issue that Nework data source did not display heart rate data" + "\n V3.1.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition" + + "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active" ); // This makes the links display as links, but they do not respond to clicks for some reason... Linkify.addLinks(s, Linkify.ALL); @@ -444,13 +440,9 @@ 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- 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 V3.1.8 - Added READ_PHONE_STATE permission, which seems to be needed for some phones" - + "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added faut pips for missing heart rate data if heart rate alarm active" + + "\n V3.1.11 - Fixed issue that Nework data source did not display heart rate data" + "\n V3.1.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition" + + "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active" + "\n " ); // This makes the links display as links, but they do not respond to clicks for some reason... diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..791c585 --- /dev/null +++ b/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 069233e..11ffe44 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:3.5.1' } } allprojects { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a3fe0a8..d63a266 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 22 16:59:24 BST 2019 +#Wed Oct 23 19:45:23 BST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip