Skip to content
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

Fix: Return correct permission status for Android's limited media access #1362

Merged

Conversation

VladShturma
Copy link
Contributor

@VladShturma VladShturma commented Aug 16, 2024

This PR fixes the issue #1243

Before fix when selecting 'Selected Photos Access enabled' on Android 14 the code
await Permission.photos.request();
returned PermissionStatus.denied. After fix it returns PermissionStatus.limited

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

@mvanbeusekom mvanbeusekom merged commit ddc2203 into Baseflow:main Aug 16, 2024
1 check passed
@LulleBulle
Copy link
Contributor

nice job @VladShturma. I was looking at it the other day but did not understand why requestPermissions implementation was not enough and I had some issues locating the success callback but now saw that the comment above mentions onRequestPermissionsResult

@LulleBulle
Copy link
Contributor

I have tried it in the examples app and I still get that it returns denied.
image
@VladShturma @mvanbeusekom

@VladShturma
Copy link
Contributor Author

@LulleBulle are you using example app that is inside permission_handler_android directory?
Because I also checked in example app and it returns limited
image

@LulleBulle
Copy link
Contributor

@LulleBulle are you using example app that is inside permission_handler_android directory? Because I also checked in example app and it returns limited image

Yes, I might have had some issues with gradle not compiling correctly and using an old version. Thanks for verifying for me :)

dogiaplinh pushed a commit to dogiaplinh/flutter-permission-handler that referenced this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants