Quantcast
Channel: Storage permission request not working in Flutter - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Storage permission request not working in Flutter

$
0
0

I am trying to access storage on an Android emulator (SDK 33) from Flutter.Here is the code that I'm testing it with:

void test() async {     PermissionStatus storageStatus = await Permission.storage.request();     if (storageStatus == PermissionStatus.granted) {         print("granted");     }     if (storageStatus == PermissionStatus.denied) {         print("denied");     }     if (storageStatus == PermissionStatus.permanentlyDenied) {         openAppSettings();     } }

I have included the "android.permission.WRITE_EXTERNAL_STORAGE" permission in the AndroidManifest.xml.

I have tried giving permissions for Camera and it worked, but it doesn't work for storage.

When I check for the storages permission status it is permanently denied, and when app's settings open it says "No permissions requested".

I have tried running "flutter clean" which seems to be necessary when updating the Manifest.

I have tried uninstalling from the phone and reinstalling the app

How do I fix it?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images