Good evening everyone. I stumbled upon a strange problem:
I need to be able to read the zoom of the camera at the time the photo was taken (I am using camera intent) or know somehow the zoom level of every photo I take. Tried to find it in packages such as camera2 or camera2.params but no luck. I need to read it on ActivityResult as I know by then that the photo was taken and I can be sure that the zoom I have was used for that photo from intent.
Thank you for your time.
You can use ExifInterface
and see if the image has TAG_IMAGE_ZOOM_RATIO
set. However:
This would not cover optical zoom, though few Android devices offer it
I expect that few camera apps bother adding this EXIF tag
Otherwise, you would need to take the photo yourself, perhaps using a library like CameraKit-Android or Fotoapparat that wrap around the core camera APIs.