user1595266
user1595266

Reputation: 85

detect if a picture was taken with the front camera

In my application, i want to take picture using built-in camera application. Taking picture process is working fine. I want to know is picture taken from front camera or back camera, because after taking picture i want to get the rotation angle and rotate the picture to that angle and store it in sdcard. ExifInterface always return the same angle(90) rather user take the picture from front/back camera. When user take the picture from back camera, rotation is fine but when user take the picture from front camera, picture rotation is wrong. Please suggest any solution for this problem.

Thanks

Upvotes: 1

Views: 1533

Answers (1)

Alex Cohn
Alex Cohn

Reputation: 57183

I believe that your device does something wrong with the rotation flag. You should try other devices, too.

Note that MediaStore.ACTION_IMAGE_CAPTURE may be fulfilled by different Camera apps on different devices, or even on the same device: the end user is free to choose. Some downloaded applications will respect an extra to choose the front camera (see https://stackoverflow.com/a/11159760/192373), other won't. Some will do a better job to provide correct EXIF, others will mess it up.

Upvotes: 0

Related Questions