Baseflow / Baseflow/flutter-permission-handler
Permission.storage.request() not working in devices of android 10 in flutter
- Dominant language
- Dart
- Stars
- 2.2k
- Forks
- 970
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 2
Description
### Please check the following before submitting a new issue.
- [X] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).
- [X] I have carefully [read the documentation](https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler/README.md) and verified I have added the required platform specific configuration.
### Please select affected platform(s)
- [X] Android
- [ ] iOS
- [ ] Windows
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.