Skip to content

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

Open
@irshukhanap

Description

@irshukhanap

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions