When camera application captures a photo, it saves Date Taken data in the captured image. As shown in below screen.
I have created custom camera in Android. I want to write the same field Date Taken data on a JPEG file, I used ExifInterface.TAG_DATETIME
field to achieve this. But the API is not able to write this field. See the below image. Please tell me what can be the issue?
I used below code to achieve this:
ExifInterface mObjExifInterface = new ExifInterface(amsFCapturePhoto);
mObjExifInterface.setAttribute(ExifInterface.TAG_DATETIME, getDateTimeByFormat(
DATE_FORMAT_YEAR_MONTH_DATE_SHORT_TIME));
mObjExifInterface.saveAttributes();
Thanks in advance.