Description
In .NET MAUI 10 (e.g., MauiVersion=10.0.0), MediaPicker.PickPhotosAsync appears to redact or corrupt location metadata on Android devices. In .NET MAUI 9 (e.g., MauiVersion=9.0.120), MediaPicker.PickPhotoAsync is able to read location metadata normally.
Steps to Reproduce
-
- On your Android device, download or take a photo that contains location metadata.
-
- Clone the MauiEXIFApp project from the GitHub link above.
-
- Ensure the
bin and obj folders are clean in the MauiEXIFApp project.
-
- Open
MauiEXIFApp in Visual Studio.
-
- Edit
MauiEXIFApp.csproj and set <MauiVersion> to either 9.0.120 (working) or 10.0.0 (not working).
-
- Build and deploy the app to an Android device (e.g., Samsung S21 FE running Android 16).
-
- Launch the app.
-
- Use Pick Photo and select an image that you know contains location metadata.
-
- In the 9.0.x version, the location information is displayed correctly. In the 10.0.x version, the location values are returned as
NaN.
-
- All other EXIF metadata remains intact.
Link to public reproduction project repository
https://github.com/stephenquan/MauiEXIFApp
Version with bug
10.0.0
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.120 SR12
Affected platforms
Android
Affected platform versions
Android
Did you find any workaround?
No workaround found. Extra troubleshooting conducted:
- The app includes
ACCESS_MEDIA_LOCATION, READ_EXTERNAL_STORAGE and READ_MEDIA_IMAGES in the AndroidManifest.xml.
- I attempted to request the
ACCESS_MEDIA_LOCATION permission before launching MediaPicker.
- I tested additional .NET MAUI v10 versions (e.g., 10.0.30), but the issue still persists.
- I tested multiple .NET MAUI v9 versions (e.g., 9.0.60), and location metadata works correctly.
Relevant log output
Description
In .NET MAUI 10 (e.g.,
MauiVersion=10.0.0),MediaPicker.PickPhotosAsyncappears to redact or corrupt location metadata on Android devices. In .NET MAUI 9 (e.g.,MauiVersion=9.0.120),MediaPicker.PickPhotoAsyncis able to read location metadata normally.Steps to Reproduce
binandobjfolders are clean in the MauiEXIFApp project.MauiEXIFAppin Visual Studio.MauiEXIFApp.csprojand set<MauiVersion>to either 9.0.120 (working) or 10.0.0 (not working).NaN.Link to public reproduction project repository
https://github.com/stephenquan/MauiEXIFApp
Version with bug
10.0.0
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.120 SR12
Affected platforms
Android
Affected platform versions
Android
Did you find any workaround?
No workaround found. Extra troubleshooting conducted:
ACCESS_MEDIA_LOCATION,READ_EXTERNAL_STORAGEandREAD_MEDIA_IMAGESin theAndroidManifest.xml.ACCESS_MEDIA_LOCATIONpermission before launchingMediaPicker.Relevant log output