V3.1.7 - Added mute function from Garmin Data Source watch buttons.
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
V3.2.0 - (NEXT VERSION!)
|
V3.2.0 - (NEXT VERSION!)
|
||||||
- Added neural network based data analysis.
|
- Added neural network based data analysis.
|
||||||
|
|
||||||
|
V3.1.7 - 28apr2919
|
||||||
|
- Added Mute function from watch Menu button.
|
||||||
|
|
||||||
V3.1.6 - 27apr2919
|
V3.1.6 - 27apr2919
|
||||||
- Made the Cancel Audible button inhibit SMS alarms as well as audible beeps.
|
- Made the Cancel Audible button inhibit SMS alarms as well as audible beeps.
|
||||||
|
|
||||||
|
|||||||
BIN
app/release/app-release-3.1.7.apk
Normal file
BIN
app/release/app-release-3.1.7.apk
Normal file
Binary file not shown.
@@ -1 +1 @@
|
|||||||
[{"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":{}}]
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":61,"versionName":"3.1.7","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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="uk.org.openseizuredetector"
|
package="uk.org.openseizuredetector"
|
||||||
android:versionCode="60"
|
android:versionCode="61"
|
||||||
android:versionName="3.1.6"
|
android:versionName="3.1.7"
|
||||||
>
|
>
|
||||||
<!--android:allowBackup="false"-->
|
<!--android:allowBackup="false"-->
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ public class SdDataSourceGarmin extends SdDataSource {
|
|||||||
private short mFallThreshMin;
|
private short mFallThreshMin;
|
||||||
private short mFallThreshMax;
|
private short mFallThreshMax;
|
||||||
private short mFallWindow;
|
private short mFallWindow;
|
||||||
|
private int mMute; // !=0 means muted by keypress on watch.
|
||||||
|
|
||||||
private int mAlarmCount;
|
private int mAlarmCount;
|
||||||
|
|
||||||
@@ -376,6 +377,12 @@ public class SdDataSourceGarmin extends SdDataSource {
|
|||||||
// if we get 'null' HR (For example if the heart rate is not working)
|
// if we get 'null' HR (For example if the heart rate is not working)
|
||||||
mSdData.mHR = -1;
|
mSdData.mHR = -1;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
mMute = dataObject.getInt("Mute");
|
||||||
|
} catch (JSONException e) {
|
||||||
|
// if we get 'null' HR (For example if the heart rate is not working)
|
||||||
|
mMute = 0;
|
||||||
|
}
|
||||||
JSONArray accelVals = dataObject.getJSONArray("data");
|
JSONArray accelVals = dataObject.getJSONArray("data");
|
||||||
Log.v(TAG, "Received " + accelVals.length() + " acceleration values");
|
Log.v(TAG, "Received " + accelVals.length() + " acceleration values");
|
||||||
int i;
|
int i;
|
||||||
@@ -539,6 +546,10 @@ public class SdDataSourceGarmin extends SdDataSource {
|
|||||||
mSdData.fallAlarmStanding = true;
|
mSdData.fallAlarmStanding = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mMute != 0) {
|
||||||
|
Log.v(TAG,"Mute Active - setting fall alarm to mute");
|
||||||
|
mSdData.fallAlarmStanding = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mSdData.mFallActive = false;
|
mSdData.mFallActive = false;
|
||||||
@@ -647,6 +658,7 @@ public class SdDataSourceGarmin extends SdDataSource {
|
|||||||
mAlarmCount = 0;
|
mAlarmCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.v(TAG, "inAlarm=" + inAlarm + ", alarmState = " + mSdData.alarmState + " alarmCount=" + mAlarmCount + " mAlarmTime=" + mAlarmTime);
|
Log.v(TAG, "inAlarm=" + inAlarm + ", alarmState = " + mSdData.alarmState + " alarmCount=" + mAlarmCount + " mAlarmTime=" + mAlarmTime);
|
||||||
|
|
||||||
/* Check Heart Rate against alarm settings */
|
/* Check Heart Rate against alarm settings */
|
||||||
@@ -659,6 +671,12 @@ public class SdDataSourceGarmin extends SdDataSource {
|
|||||||
mSdData.mHRAlarmStanding = false;
|
mSdData.mHRAlarmStanding = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mMute != 0) {
|
||||||
|
Log.v(TAG,"Mute Active - setting alarms to mute");
|
||||||
|
mSdData.alarmState = 6;
|
||||||
|
mSdData.alarmPhrase = "MUTE";
|
||||||
|
mSdData.mHRAlarmStanding = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -767,14 +767,7 @@ public class SdServer extends Service implements SdDataReceiver {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "sendSMSAlarm() - Cancel Audible Active - not sending SMS");
|
Log.i(TAG, "sendSMSAlarm() - Cancel Audible Active - not sending SMS");
|
||||||
<<<<<<< HEAD
|
|
||||||
mUtil.showToast("Cancel Audible Active - not sending SMS");
|
mUtil.showToast("Cancel Audible Active - not sending SMS");
|
||||||
=======
|
|
||||||
Toast toast = Toast.makeText(getApplicationContext(),
|
|
||||||
"Cancel Audible Active - not sending SMS",
|
|
||||||
Toast.LENGTH_SHORT);
|
|
||||||
toast.show();
|
|
||||||
>>>>>>> 6c31fa8aea6a9815f626c17dd29b721c88e9a8c2
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "sendSMSAlarm() - SMS Alarms Disabled - not doing anything!");
|
Log.i(TAG, "sendSMSAlarm() - SMS Alarms Disabled - not doing anything!");
|
||||||
|
|||||||
Reference in New Issue
Block a user