breautek commented on issue #916: URL: https://github.com/apache/cordova-plugin-camera/issues/916#issuecomment-2454721746
> Add Location to Intent: When launching the camera intent, explicitly set the location. You can use the ExifInterface to manually add the location tags to the image after capturing it. I believe this is how the iOS implementation kind of works, but it involves an additional level of complexity as it requires managing location state with another asynchronous process. I think it was necessary for iOS whereas Android, the underlying camera application typically handled it assuming the Camera application itself had the geolocation permissions. To make the geolocation permissions optional, iOS uses a preference, and when enabled it will request and use the geolocation APIs and add to the exif itself. Android could do the same thing, and use the same preference to enable the functionality. The core location API available in Android is not great to say the least, and documentation is sparse. They have a Google Play services API for geolocation instead, but making the camera plugin depend on that will likely be considered a breaking change. Before we get into that though, I would like to see why the EXIF attributes are not being returned in the first place, given you said that they are actually available if you pull directly from DCIM and inspect the metadata manually. > I don't believe it possible for Cordova to use a custom camera on Android any more, this is why we added the watermark since our customers were previously using a custom camera with watermarking. Cordova never implemented a custom camera, or uses the camera APIs directly. It always relied on using Intents, which is a way for one application to delegate camera tasks to another installed application (which the user may choose) and have the result be given back to the requesting application. It is possible that the installed Camera application being used just doesn't use geolocation or set the location EXIF attributes anymore when capturing photos. But I think you've cleared that possibility in this case by stating: ``` Taking from the gallery I can confirm that when I copy the file locally from DCIM, the exif location information is present, but if I select the same picture from the gallery in the application the location information is not present when the camera launcher reads the EXIF. ``` If the underlying image contains the EXIF attributes, then at least sourcing that same image by picking from the gallery > I don't believe it possible for Cordova to use a custom camera on Android any more, this is why we added the watermark since our customers were previously using a custom camera with watermarking. Is it possible that your watermarking tool is messing with EXIF attributes? Are you able to reproduce the issue in a [Sample Reproduction app](https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md)? If so then that sample project can be shared which will help serve as a test case. > I was wondering if you were able to verify the issue, we're concerned about this loss of functionality and finding a fix is going to become important quickly. I have not and I haven't had an opportunity to try to replicate the issue either. To be frank my volunteer time is better spent elsewhere to solve the problems with using `READ_MEDIA_*` permissions which affects a larger user base of developing Cordova applications currently. So I don't foresee myself getting much deeper in the near future than the support I'm currently attempting to provide. I don't mean any disrespect, so I apologise if it's coming across this way. I'm sharing knowledge in hopes that it can provide enough assistance for you/your company to find the root cause and potential solutions, especially since at the moment you have a reproduction case available to test against. And if you do find the cause and solution, then it would be _nice_ (but not required to) send a pull request back to the Camera plugin under the Apache 2.0 license. If your company forbids it, then your company will likely require to fork and maintain their own version of the camera plugin instead of relying on open source contributions, especially if a fix for this feature is mission critical for your app. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org