[Question]: Permission.manageExternalStorage.status alway denied
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation.
Please select for which platform(s) you need help
- [X] Android
- [ ] iOS
- [ ] Windows
Your question
I'm using permission_handler and am having trouble saving files. I want to save the image to Picture, the file to Download. From sdk33, I have not found any other way than request manageExternalStorage . But I have a very strange problem: every time I check, it returns status denied even though I called settings and accepted before. Call request, if not then accept, if yes then do nothing => back then status granted .
In general, I only get granded when I go back from the settings page, so I don't know if it's really granted or not. Even though it returns denied, in fact it was previously granted so saving the file is still ok.
`
PermissionStatus permission1 = await Permission.manageExternalStorage.status; //alway denied
if (permission != PermissionStatus.granted) {
Map<Permission, PermissionStatus> permStatuses = await [Permission.manageExternalStorage].request();
PermissionStatus? permission2 = permStatuses[Permission.manageExternalStorage]; //can have granted
}`
Version
11.0.0
We are running into the same problem.
- Android 14
- permission_handler 11.0.0
@shpy2001
Are you using photo_manager or wechat_assets_picker?
@shpy2001 Are you using
photo_managerorwechat_assets_picker?
Yes, I'm using wechat_assets_picker.
wechat_assets_picker depends on photo_manager
See below
https://pub.dev/packages/photo_manager#usage
final PermissionState ps = await PhotoManager.requestPermissionExtend();
Your problem is now solved!
This was an issue that we supposedly solved earlier this week. Could you run flutter pub upgrade to make sure you are pulling in the latest permission_handler_android version? You can check the content of the pubspec.lock file. There should be an entry stating permission_handler_android... version: "11.0.5".
wechat_assets_pickerdepends onphoto_managerSee below https://pub.dev/packages/photo_manager#usagefinal PermissionState ps = await PhotoManager.requestPermissionExtend();Your problem is now solved!
Thank you very much !!! Your solution does not need to use manager_External_Storage, which is permission sensitive.