V4.1.5 - Added progress spinner to export data screen, added header to exported .csv file, fixed another notification crash.
Fixes #84, #85, #90
This commit is contained in:
Binary file not shown.
@@ -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"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:versionCode="118"
|
android:versionCode="119"
|
||||||
android:versionName="4.1.4">
|
android:versionName="4.1.5">
|
||||||
<!-- android:allowBackup="false" -->
|
<!-- android:allowBackup="false" -->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import android.view.View;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.DatePicker;
|
import android.widget.DatePicker;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TimePicker;
|
import android.widget.TimePicker;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
|
|
||||||
@@ -208,7 +209,12 @@ public class ExportDataActivity extends AppCompatActivity
|
|||||||
// mDateTxt.getText().toString(), mTimeTxt.getText().toString(), mDuration));
|
// mDateTxt.getText().toString(), mTimeTxt.getText().toString(), mDuration));
|
||||||
Log.d(TAG, String.format("EndDate=%s %s, Duration=%3.1f hrs",
|
Log.d(TAG, String.format("EndDate=%s %s, Duration=%3.1f hrs",
|
||||||
mDateTxt.getText().toString(), mTimeTxt.getText().toString(), mDuration));
|
mDateTxt.getText().toString(), mTimeTxt.getText().toString(), mDuration));
|
||||||
|
ProgressBar pb = (ProgressBar) findViewById(R.id.exportPb);
|
||||||
|
pb.setIndeterminate(true);
|
||||||
|
pb.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
mExportBtn.setEnabled(false);
|
||||||
|
mExportBtn.setVisibility(View.INVISIBLE);
|
||||||
this.openFile();
|
this.openFile();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -268,8 +274,7 @@ public class ExportDataActivity extends AppCompatActivity
|
|||||||
openFileDescriptor(uri, "w");
|
openFileDescriptor(uri, "w");
|
||||||
FileOutputStream fileOutputStream =
|
FileOutputStream fileOutputStream =
|
||||||
new FileOutputStream(pfd.getFileDescriptor());
|
new FileOutputStream(pfd.getFileDescriptor());
|
||||||
// fileOutputStream.write(("Overwritten at " + System.currentTimeMillis() +
|
fileOutputStream.write(("# dataTime, alarmState, hr, o2sat, accel*125\n").getBytes());
|
||||||
// "\n").getBytes());
|
|
||||||
JSONArray dataObj;
|
JSONArray dataObj;
|
||||||
try {
|
try {
|
||||||
dataObj = new JSONArray(datapointsJsonStr);
|
dataObj = new JSONArray(datapointsJsonStr);
|
||||||
@@ -319,6 +324,17 @@ public class ExportDataActivity extends AppCompatActivity
|
|||||||
mUtil.showToast(getString(R.string.error_exporting_data));
|
mUtil.showToast(getString(R.string.error_exporting_data));
|
||||||
Log.e(TAG, "exportToFile() - IOException: " + e.toString());
|
Log.e(TAG, "exportToFile() - IOException: " + e.toString());
|
||||||
}
|
}
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
ProgressBar pb = (ProgressBar) findViewById(R.id.exportPb);
|
||||||
|
pb.setIndeterminate(true);
|
||||||
|
pb.setVisibility(View.INVISIBLE);
|
||||||
|
mExportBtn.setEnabled(true);
|
||||||
|
mExportBtn.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,18 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Export Local Data"
|
android:text="Export Local Data"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="End Date/Time (dd-mm-yyyy hh:mm)"
|
android:text="End Date/Time (dd-mm-yyyy hh:mm)" />
|
||||||
/>
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -25,15 +26,16 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:text="(end date)" />
|
android:text="(end date)" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/dateBtn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Select Date"
|
android:text="Select Date" />
|
||||||
android:id="@+id/dateBtn"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -45,33 +47,45 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:text="(end time)" />
|
android:text="(end time)" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/timeBtn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Select Time"
|
android:text="Select Time" />
|
||||||
android:id="@+id/timeBtn"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Duration (hrs)"
|
android:text="Duration (hrs)" />
|
||||||
/>
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/durationText"
|
android:id="@+id/durationText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="numberDecimal"
|
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
android:text="1.0" />
|
android:text="1.0" />
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Export Data"
|
android:orientation="horizontal">
|
||||||
android:id="@+id/exportBtn"
|
|
||||||
/>
|
<Button
|
||||||
|
android:id="@+id/exportBtn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Export Data" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/exportPb"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<string name="app_name">OpenSeizureDetector</string>
|
<string name="app_name">OpenSeizureDetector</string>
|
||||||
<string name="changelog">
|
<string name="changelog">
|
||||||
"\n
|
"\n
|
||||||
|
\nV4.1.5 - Added progress notification to data export, added header to exported .csv file, fixed another notification bug.
|
||||||
\nV4.1.4 - Fixed bug in notifications on Android 12, added an Export Data function to save heart rate and accelerometer data to a file.
|
\nV4.1.4 - Fixed bug in notifications on Android 12, added an Export Data function to save heart rate and accelerometer data to a file.
|
||||||
\nV4.1.3 - Fixed display of O2 Saturation in Network Data Source, and added Polish Translations by Jacek Błoniarz-Łuczak. Fixed crash when displaying main activity during alarm on some devices. Added adaptive Heart Rate alarms
|
\nV4.1.3 - Fixed display of O2 Saturation in Network Data Source, and added Polish Translations by Jacek Błoniarz-Łuczak. Fixed crash when displaying main activity during alarm on some devices. Added adaptive Heart Rate alarms
|
||||||
\nV4.1.2 - Added Machine Learning (Artificial Intelligence) Detection Algorithm Option (CNN V0.24) and 'Normal Daily Activity (NDA) logging function
|
\nV4.1.2 - Added Machine Learning (Artificial Intelligence) Detection Algorithm Option (CNN V0.24) and 'Normal Daily Activity (NDA) logging function
|
||||||
|
|||||||
Reference in New Issue
Block a user