Skip to content

[Question]: Unable to handle storage permission for Android 8.10 as well as Android 16 #1468

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

Open
3 of 5 tasks
irshukhanap opened this issue Apr 24, 2025 · 0 comments
Open
3 of 5 tasks

Comments

@irshukhanap
Copy link

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

  • Android
  • iOS
  • Windows

Your question

I am trying to backup my flutter app db file programmatically to a user selected folder like documents folder and i am using file_picker for selecting the folder. The problem is that on Android 16 no storage permission is required by my app as the permission is handled by file_picker itself. However, i was testing the app on a physical device running Android 8.1.0 and after selecting the folder the copy operation throws an exception (PathAccessException OS Error: Permission denied, errno13). If i use the permission_handler package to request WRITE_EXTERNAL_STORAGE then the issue is resolved for Android 8.1.0 physical device but on Android 16 device this permission is automatically denied even if the user allows the permission to file_picker.
The point is that permission_handler should return this permission as granted, not denied on later android versions where this permission is no longer need. Does permission_handler have a mechanism to automatically handle such situations? How to resolve it?

Version

12.0.0+1

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

No branches or pull requests

1 participant