From 2470f8d9701ecaf666c55e044dfe6e68087c409e Mon Sep 17 00:00:00 2001 From: Marius Van Nieuwenhuyse Date: Mon, 27 Jul 2026 20:37:01 +0200 Subject: [PATCH] feat(android): Added `originalDateTime` to exif handling --- src/android/ExifHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/android/ExifHelper.java b/src/android/ExifHelper.java index d58a416..6faf18c 100644 --- a/src/android/ExifHelper.java +++ b/src/android/ExifHelper.java @@ -43,6 +43,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; @@ -100,6 +101,7 @@ public class ExifHelper { 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); } /** @@ -170,6 +172,9 @@ public class ExifHelper { 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(); }