diff --git a/src/android/ExifHelper.java b/src/android/ExifHelper.java index 5160a2f6a..23392d450 100644 --- a/src/android/ExifHelper.java +++ b/src/android/ExifHelper.java @@ -42,6 +42,7 @@ public class ExifHelper { private String model = null; private String orientation = null; private String whiteBalance = null; + private String dateTimeOriginal = null; private ExifInterface inFile = null; private ExifInterface outFile = null; @@ -89,6 +90,7 @@ public void readExifData() { this.model = inFile.getAttribute(ExifInterface.TAG_MODEL); this.orientation = inFile.getAttribute(ExifInterface.TAG_ORIENTATION); this.whiteBalance = inFile.getAttribute(ExifInterface.TAG_WHITE_BALANCE); + this.dateTimeOriginal = inFile.getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL); } /** @@ -159,6 +161,9 @@ public void writeExifData() throws IOException { if (this.whiteBalance != null) { this.outFile.setAttribute(ExifInterface.TAG_WHITE_BALANCE, this.whiteBalance); } + if (this.dateTimeOriginal != null) { + this.outFile.setAttribute(ExifInterface.TAG_DATETIME_ORIGINAL, this.dateTimeOriginal); + } this.outFile.saveAttributes(); }