-
Notifications
You must be signed in to change notification settings - Fork 500
remove read/write storage permissions from filepicker/mediapicker on Android #1968
Conversation
Will need this one reviewed and then ported to .NET MAUI (i will open the PR). I think it is valid. Would be good to have some eyes on it. |
// we only need the permission when accessing the file, but it's more natural | ||
// to ask the user first, then show the picker. | ||
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>(); |
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'm not too familiar with this area, but would this permission check still be needed for Android versions prior to 30? ie. should there be a version check here?
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.
From what Google is reporting when people submit apps is that they will reject them even if they have the setting in there. I tested it out on older and newer devices and it seemed to work
@@ -6,11 +6,9 @@ | |||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |||
<uses-permission android:name="android.permission.BATTERY_STATS" /> | |||
<uses-permission android:name="android.permission.CAMERA" /> | |||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |||
<uses-permission android:name="android.permission.FLASHLIGHT" /> | |||
<uses-permission android:name="android.permission.FLASHLIGHT" /> |
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.
<uses-permission android:name="android.permission.FLASHLIGHT" /> | |
<uses-permission android:name="android.permission.FLASHLIGHT" /> |
Is this ready to merge? Would like to consume this in MAUI/Blazor Hybrid 😄 |
@mattleibow any objections in merging this in? |
@Redth are we able to get this in and push somethign out @jfversluis as well cc |
I'll have a look (my) tomorrow. Let me know @jamesmontemagno if you have any more on the list that you think might be ready to go. I'll fix things up tomorrow and see if I can do a release early next week |
@rmarinho seems build is failing after the last changes you made to the pipeline any ideas? |
iOS build is broken and being worked on, but since this is Android only, this seems good to me! |
@jfversluis how does this make its way into MAUI Essentials? I need to validate dotnet/maui#2678 after that's there. |
This should be already in there: dotnet/maui#4697 |
@jamesmontemagno @jfversluis isn't this still broken because the write permission is still asked for when you're taking a photo? |
Description of Change
Due to changes in targeting Android 11 the read/write permissions are super blocked. We dont' need them though as the API doesn't require them
Bugs Fixed
Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR.
API Changes
None.
Behavioral Changes
No longer require permissions.
PR Checklist
main
at time of PR