Camera MediaPicker throws error about write external storage on api 31 #13119
Labels
area-essentials
Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info
platform/android 🤖
t/bug
Something isn't working
Description
Using the camera in Maui doesn't seem to work due to permission issues. Using MediaPicker example from the Microsoft documents doesn’t work. Throws error as it tries to access storage.
Error: Microsoft.Maui.ApplicationModel.PermissionException: 'StorageWrite permission was not granted: Denied'
Note that if I don't request StorageWrite permission I get the following error:
Microsoft.Maui.ApplicationModel.PermissionException: 'You need to declare using the permission: android.permission.WRITE_EXTERNAL_STORAGE in your AndroidManifest.xml'
So, bit of a catch 22 situation...
Steps to Reproduce
Do exactly what this page shows:
https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker
Android.Manifest entries:
Code:
Link to public reproduction project repository
?
Version with bug
6.0.312
Last version that worked well
Sounds like it has never worked, based on the number of people reporting it.
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android api 31
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: