Skip to content

Commit

Permalink
Release version was making empty images. Made minor changes.
Browse files Browse the repository at this point in the history
versionCode 18, versionName "3.2.2"
  • Loading branch information
KennethEvans committed May 27, 2023
1 parent 17c08a8 commit e5b7d00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "net.kenevans.polar.polarecg"
minSdkVersion 23
targetSdkVersion 33
versionCode 16
versionName "3.2.0"
versionCode 18
versionName "3.2.2"
}

buildTypes {
Expand Down
11 changes: 8 additions & 3 deletions app/src/main/java/net/kenevans/polar/polarecg/ECGActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -898,12 +898,16 @@ private void doSavePlot(final String note) {
String.format(Locale.US, "%.1f sec", nSamples / FS),
ecgvals,
peakvals);
bm.compress(Bitmap.CompressFormat.PNG, 80, strm);
Log.d(TAG, "Bitmap Byte count=" + bm.getByteCount());
boolean res = bm.compress(Bitmap.CompressFormat.PNG, 80, strm);
if (!res) {
Utils.errMsg(this, "failed to get bitmap");
}
strm.close();
msg = "Wrote " + docUri.getLastPathSegment();
Log.d(TAG, msg);
Utils.infoMsg(this, msg);
}
pfd.close();
} catch (Exception ex) {
msg = "Error saving plot";
Log.e(TAG, msg);
Expand Down Expand Up @@ -973,8 +977,8 @@ private void doSaveData(String note) {
}
out.flush();
msg = "Wrote " + docUri.getLastPathSegment();
Log.d(TAG, msg);
Utils.infoMsg(this, msg);
pfd.close();
}
} catch (Exception ex) {
msg = "Error writing CSV file";
Expand Down Expand Up @@ -1039,6 +1043,7 @@ private void doSaveSessionData(SaveType saveType) {
Utils.infoMsg(this, msg);
Log.d(TAG, " Wrote " + dataList.size() + " items");
}
pfd.close();
} catch (Exception ex) {
msg = "Error writing " + saveType + " CSV file";
Log.e(TAG, msg);
Expand Down

0 comments on commit e5b7d00

Please sign in to comment.