Description
🐛 Bug Report
When accepting permissions for storage access and then trying to create a folder in Documents directory I'm getting following error:
I/flutter (14558): FileSystemException: Creation failed, path = '/storage/emulated/0/Documents/Test' (OS Error: Permission denied, errno = 13)
I'm using following request which I'm expecting both read & write permissions
would be granted:
if (!await Permission.storage.request().isGranted) {
As it turns out, it only grants read permissions:
runtime permissions:
android.permission.READ_EXTERNAL_STORAGE: granted=true, flags=[ USER_SET|USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED|RESTRICTION_INSTALLER_EXEMPT]
android.permission.WRITE_EXTERNAL_STORAGE: granted=false, flags=[ USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED|RESTRICTION_INSTALLER_EXEMPT]
And yes, i do have required permissions in my AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Expected behavior
Get write access
when calling Permission.storage.request()
.
Reproduction steps
Call Permission.storage.request()
and create a folder in an external storage.
Configuration
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1110], locale pl-PL)
Version: ^8.1.4+2
Platform:
- 📱 iOS
- 🤖 Android