V3.11 - Fixed heart rate reporting in network datasource
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
BIN
app/release/app-release-3.1.11.apk
Normal file
BIN
app/release/app-release-3.1.11.apk
Normal file
Binary file not shown.
@@ -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":{}}]
|
||||
[{"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":{}}]
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="64"
|
||||
android:versionName="3.1.10"
|
||||
android:versionCode="65"
|
||||
android:versionName="3.1.11"
|
||||
>
|
||||
<!--android:allowBackup="false"-->
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
@@ -28,7 +29,11 @@
|
||||
<application
|
||||
android:theme="@style/Theme.AppCompat"
|
||||
android:icon="@drawable/star_of_life_48x48"
|
||||
android:label="@string/app_name">
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
>
|
||||
<!--android:usesCleartextTraffic="true"-->
|
||||
|
||||
<activity android:name=".StartupActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -64,7 +69,6 @@
|
||||
<uses-library
|
||||
android:name="org.apache.http.legacy"
|
||||
android:required="false" />
|
||||
|
||||
</application>
|
||||
|
||||
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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...
|
||||
|
||||
5
app/src/main/res/xml/network_security_config.xml
Normal file
5
app/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<!-- Set application-wide security config using base-config tag.-->
|
||||
<base-config cleartextTrafficPermitted="true"/>
|
||||
</network-security-config>
|
||||
@@ -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 {
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user