2

I want to take photo using MediaStore.ACTION_IMAGE_CAPTURE intent, and save with MediaStore.EXTRA_OUTPUT. My code is same as this link: http://developer.android.com/training/camera/photobasics.html

However, saved photo has no exif. It has only size information. Here is my log:

TAG_APERTURE: null
TAG_DATETIME: null
TAG_EXPOSURE_TIME: null
TAG_FLASH: null
TAG_FOCAL_LENGTH: null
TAG_GPS_ALTITUDE: null
TAG_GPS_ALTITUDE_REF: null
TAG_GPS_DATESTAMP: null
TAG_GPS_LATITUDE: null
TAG_GPS_LATITUDE_REF: null
TAG_GPS_LONGITUDE: null
TAG_GPS_LONGITUDE_REF: null
TAG_GPS_PROCESSING_METHOD: null
TAG_GPS_TIMESTAMP: null
TAG_IMAGE_LENGTH: 3264
TAG_IMAGE_WIDTH: 2448
TAG_ISO: null
TAG_MAKE: null
TAG_MODEL: null
TAG_ORIENTATION: 0
TAG_WHITE_BALANCE: null

I set INTERNET, CAMERA, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE permissions.

My device is Nexus 5 and android version is 5.1.1.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
YhChun
  • 33
  • 4

1 Answers1

1

There is no requirement for any camera app to necessarily store any particular EXIF headers in the files. What the camera app does is up to the authors of the camera app, not you.

If you need to force certain EXIF headers to exist, you will need to put those EXIF headers in the file yourself.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • strange.. I used this feature a few month ago. I'm not taking customized camera, but just device default. I found something that exif data is saved if I take on landscape mode, but still no exif on portrait. – YhChun Jul 01 '15 at 21:19
  • @YhChun: "I'm not taking customized camera, but just device default" -- there are thousands of Android device models, with many default camera apps between them. "I found something that exif data is saved if I take on landscape mode, but still no exif on portrait" -- that sounds like a bug in your device's default camera app. – CommonsWare Jul 01 '15 at 21:21
  • 2
    I found a solution: uninstall updates of camera app. I think it's a bug in this version. Thank you for your answer. – YhChun Jul 01 '15 at 21:49
  • I've run into this issue as well. Uninstalling updates solved it. Re-installing the updates do not work. – terencey Jul 16 '15 at 04:01