-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fixes #5015 - custom image selector not identifying photo location #5190
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
Merged
nicolas-raoul
merged 1 commit into
commons-app:master
from
sivasubramaniamv:exif-location-loss
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! This function is only for the custom selector, right? As @sivaraam stated here and suggested by @nicolas-raoul too, this may have to be implemented for the regular selector too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is executed on pressing the custom selector. I suggest @sivaraam run the app with these changes & observe if the case is still the same. If so we have two options:
Request permissions on clicking the + floating action button in ContributionsListFragment, so it is granted before the user could use any of the image pickers
Copy the ACCESS_MEDIA_LOCATION permission request code block to the function that gets executed when the regular picker is pressed, ie: initiateGalleryPick() at line 60 in ContributionController.java
I guess the second option is the most appropriate as there is no need to obtain WRITE_EXTERNAL_STORAGE permission if the user never uses the custom picker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to to share an image (which has location information) to the app while it does not have the location permission. When clicking on the map icon in the upload wizard, the app shows me the location drop pin shows an approx. location that is a bit far from the actual location. The actual location is not indicated at all.
When I repeat the same when the app has been granted the location permission, the location drop pin is situated a bit far away. Though, the actual location is at least indicated correctly.
PS: This seems to be the case for me when trying to upload via custom selector too (I'm not shown any location request dialog).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sivaraam, this is happening with me as well. Is this not because the EXIF location may be different from user's current location (in case the user uploads the picture later from somewhere else)? The location drop pin would display the EXIF location and the actual location is indicated by the circular mark. As far as the request dialog is concerned, adding it in the beginning (as I'd demonstrated here; we can definitely look for a better way of accessing the dialog after the if block you had mentioned) or at some other appropriate stage will indicate the actual location too. The circular mark indicating the actual location will then not be visible only in case the user denies to provide location access.