-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@capacitor/camera 6.0.1 pickImages results has zeros/empty in exif GPS data on Android #2147
Comments
@danbritt |
I found an older issue about this problem where someone recommended doing that and it did not work for me. If you can make the example work by doing that, please fork the repo and post a link to the working one. Thank you for the link to that plugin. I will give it a try to fix the issue. However, I still feel that the Camera plugin should provide this functionality since it does return the exif data as one of the properties in the result. |
I had some time today to try to implement that plugin on the project I'm working on. I do have that permission in my AndroidManifest.xml, but getCoordinates() is returning undefined instead of the lat/lon values. I appreciate the attempt to solve the issue! What's odd is that this only applies when picking photos from the photo album. If I use the camera plugin to capture a photo, the GPS info is present in the exif data. Same if I choose a non-album image (using the FilePicker plugin from https://github.com/capawesome-team/capacitor-plugins) |
@danbritt I confirm the problem with the camera plugin |
That is very interesting. For me, |
@danbritt it seems that the problem is because the new photo picker (which is used in Capacitor Camera v6 - see https://capacitorjs.com/docs/updating/6-0#camera) redacts GSP data from EXIF, even when I am not sure how that can be fixed, unless Capacitor Camera switch to use some alternative instead of the google photo picker API. NOTE: this file picker seems to return GPS data in EXIF (see https://capawesome.io/plugins/file-picker/) as it uses |
Thanks for the research and information you presented. I will try swapping to the capawesome plugin. |
@ryaa I swapped to using the capawesome plugin and it works great. Thanks again for the suggestion and the research on the underlying issue! |
Bug Report
Plugin(s)
@capacitor/camera 6.0.1
Capacitor Version
Platform(s)
Android. Tested on physical device with Android 12 and 14
Current Behavior
When you select a photo that has a location, the exif data returned has zeros/blanks in all the GPS properties. So it appears the GPS data is actually missing for some reason. Example:
Expected Behavior
I would expect the GPS information to have the proper values.
Code Reproduction
Minimal example app: https://github.com/danbritt/capacitor-photo-picker-example
Other Technical Details
Additional Context
I've also attempted to retrieve the file from the path returned using the Filesystem plugin, and then read the exif using a different npm package. I got the same result with the missing/zero'd out GPS properties.
The text was updated successfully, but these errors were encountered: