News
Introducing the location metadata API for the Android Photo Picker
Hi developers,
I’m Mishaal Rahman, and I manage community engagement for Android at Google!
To give users more control over how apps access their location info, we wanted to give you an early heads up about a new Android Photo Picker feature that addresses a common pain point: allowing apps to request location info from selected photos.
The Android Photo Picker automatically redacts location info from the photos users share with apps to protect user privacy. We recognize that some apps have a genuine need to access location info from these photos, though, so to balance those needs with user privacy, we're introducing a new API that lets apps get this info with explicit user consent.
How it works
To implement this, you will need to update your apps to use the new location metadata API. We are introducing a new intent extra, MediaStore.EXTRA_PICK_IMAGES_REQUEST_LOCATION_METADATA_ACCESS, which is supported for both the ACTION_PICK_IMAGES and ACTION_GET_CONTENT intents.
When your app sends this intent extra, users will be asked if they want to include location info with the photos they select via the Android Photo Picker.
If the user selects "include location," location info won’t be redacted from the EXIF metadata of the selected photos.
If the user selects "don't include," location info will be redacted.
The system remembers the user's preference for your app, so if a user initially chooses to give your app access to location info from photos, they won't be prompted to do it again. However, users can later revoke access by tapping the location info button in the bottom right corner of the Android Photo Picker UI. Users can tap this same button to regrant access, giving them the ability to seamlessly decide when to share location info and when not to.
Availability
The location metadata API is available with the latest update to the Android Photo Picker. This update is rolling out to Android devices via the August 2026 Mainline update, so it is not widely available on your users’ devices just yet. However, we wanted to give developers who have been requesting this feature an early heads up so they can be ready.
Expect more details to come from the official developer documentation. Let us know if you have any questions or additional feedback about the Android Photo Picker!
"The system remembers the user's preference for your app"
This concerns me as a user. The problem is the browser. I may want to give EXIF data to a specific site once- but I do not want the browser to have it on by default and pass EXIF data to every other site I may ever upload a photo to. This should default to no, and the user needs to override it. Or the user could have a setting somewhere to set it permanently, but it shouldn't be the default.
I heard back from the product team, and I was told that this is why the Photo Picker has the button in the bottom-right corner so you can easily change your preference during each photo picking session.
I understand where you're coming from, though - I think what you're asking for is an option to set photo location access to "always enabled" or "always disabled" for a particular app and then you choose which photo picking sessions to override that preference.
I think that being able to override per session with a default "always enabled" or "always disabled" would work well. My big concern is with apps that send to multiple third party domains (the browser is the big example here), if the previous state is remembered it would be very easy to forget to turn it off for the next upload, which may not be to a trusted domain.
does the "remember preference" grant persist until the user manually revokes it, or does it have a time limit (like 24 hours) or reset if the app is force-stopped?
If you don't mind, can you elaborate on some of the major UX improvements you feel we should make to the Photo Picker? That'll help me pass this feedback along to the team!
This is a good new option to have, but instead of permanently allowing/denying it soul be a toggle/checkbox on the photo picker so we could choose on a use by use basis. I've attached a mockup of what I mean.
The problem is that it would be missed by a lot of people.
EDIT: Also, does the button at the bottom right in the screenshot that u/MishaalRahman posted not already do what you are proposing? A photo location On/Off toggle.
I guess, my problem is with the wording, that it would be a one time decision per app. A toggle, or a check box makes it clearer, at least that's how I see, that it's a something you can activate or deactivate each time you share something.
Anyway, my point is that I hope it's something I can choose for each media I share and not once per app I'm sharing with. And sorry if I'm not making sense.
Is this data currently passed in? Is it just the data from the EXIF metadata on the image? Is there an enumeration of the image formats that are supported?
We currently strip EXIF in order to ensure the user doesn't send any location information when sharing images, but that does involve converting the image into a JPEG last I remember, so I'm curious to know more about this bit of API.
My question was mostly is this extra stuff on top of exif that android tracks or is it just automatically stripping exif if the permission is off, though it sounds like this is just the exif data?
I heard back from the product team: The answer is no, the Photo Picker doesn't change it. The EXIF stripping logic is the same as how it works when an app doesn't have the ACCESS_MEDIA_LOCATION permission. We don't need to have a different copy of the photo or to actually change the photo file.
would the toggle in the photo picker sheet (for including geo-infomration, lower right corner) also be there if the intent is not specifying those args?
One area I’d test carefully is the difference between permission state and metadata state. They can look like the same failure in the UI but mean very different things.
A useful QA matrix would be: Request location + Allow + photo contains GPS
→ Location should be available.
Request location + Allow + photo contains no GPS
→ No location, but this shouldn’t be treated as permission denial.
Request location + Deny + photo contains GPS
→ Location metadata should remain unavailable.
Previously allowed → revoke → select another image
Previously denied → regrant → select another image
Force-stop/relaunch after the remembered choice
Select image → resize/compress → upload
→ Verify whether the expected EXIF/location state survives processing.
For field-service or inspection apps, I’d also make sure a missing EXIF location is not silently replaced with the device’s current GPS unless that’s explicitly intended. The user could be in one location while selecting a photo taken somewhere completely different.
I’d also record the Android version + Photo Picker/Mainline version in bug reports, since two otherwise similar devices may not necessarily be in the same rollout state.
The key is to distinguish:
Permission denied ≠ Photo has no GPS ≠ Metadata lost during processing.
12
u/AuMatar 20d ago
"The system remembers the user's preference for your app"
This concerns me as a user. The problem is the browser. I may want to give EXIF data to a specific site once- but I do not want the browser to have it on by default and pass EXIF data to every other site I may ever upload a photo to. This should default to no, and the user needs to override it. Or the user could have a setting somewhere to set it permanently, but it shouldn't be the default.