简体   繁体   中英

How to detect if a picture was taken with the front camera

I am taking a picture using Intents. Is there a way to tell from the image file whether the picture was taken with the front or rear camera?

You can use the ExifInterface class to get data from a picture that is a .jpeg. There is a MODEL attribute that might have the camera's model. I do not know if it can tell you the position of the camera relative to the device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM