Currently, FilePicker.pickImages() does not allow developers to get location data from the exif tags. Latitude and longitude are always shown as 0, not available.
This is probably because the plugin is not asking for ACCESS_MEDIA_LOCATION permission at runtime.
Preferred solution
The plugin should maybe add a .requestPermission() method to ask for ACCESS_MEDIA_LOCATION permission at runtime.
I don't know exactly how android manages permission under the hood, but I think that ACCESS_MEDIA_LOCATION is a "restricted" type of permission, thus just adding it to the AndroidManifest.xml file does not suffice, it must also be asked at runtime apparently?
I'm quite sure this is the problem because, if I give the app full access through the settings, it works correctly and it retrieves the location from the photo correctly.
Plugin(s)
Current problem
Currently,
FilePicker.pickImages()
does not allow developers to get location data from the exif tags. Latitude and longitude are always shown as 0, not available.This is probably because the plugin is not asking for ACCESS_MEDIA_LOCATION permission at runtime.
Preferred solution
The plugin should maybe add a
.requestPermission()
method to ask forACCESS_MEDIA_LOCATION
permission at runtime. I don't know exactly how android manages permission under the hood, but I think thatACCESS_MEDIA_LOCATION
is a "restricted" type of permission, thus just adding it to theAndroidManifest.xml
file does not suffice, it must also be asked at runtime apparently?I'm quite sure this is the problem because, if I give the app full access through the settings, it works correctly and it retrieves the location from the photo correctly.
Alternative options
No response
Additional context
Code to get exif tags:
I don't know if this issue is present on iOS.
Before submitting