-
-
Notifications
You must be signed in to change notification settings - Fork 875
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
Permission.storage.request() not working in devices of android 10 in flutter #1408
Comments
Yes, happening for me too. |
@sambrucejoseph is the issue fixed or we need to look for other packages? |
I am having the same problem. @sambrucejoseph @Arunachalam-D did you guys manage to solve it, or did you move on to other solutions? |
Didn't find any solutions. I actually paused building my feature. |
I am facing the same issue. |
Yes, it's the same for me. |
Google has deprecated the storage permission since Android 13+. This is documented in our FAQ section of the README: https://pub.dev/packages/permission_handler#requesting-storage-permissions-always-returns-denied-on-android-13-what-can-i-do |
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
1.Run flutter app on device with android version 10 or below
2Aaccess storage to download files using permission_handler package
3.If initially permission not provided manually open app setting and provide storage permission
Expected results
Should open app setting if permission is not provided and upon giving storage permission files should be downloaded
Actual results
Nothing happens and 'Permission.storage.status' returns 'permission.restricted' even after providing permission from app settings
Code sample
PermissionStatus status = await permission.status;
if (Platform.isAndroid) {
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
if (!status.isGranted &&
double.parse(androidInfo.version.release) <= 11) {
...
final result = await Permission.storage.request();
}}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
^11.0.1
Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.5, on Microsoft Windows [Version 10.0.22631.4391], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
X cmdline-tools component is missing
Run
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run
flutter doctor --android-licenses
to accept the SDK licenses.See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.95.3)
[√] Connected device (5 available)
[√] Network resources
! Doctor found issues in 2 categories.
The text was updated successfully, but these errors were encountered: