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
[Android]READ_EXTERNAL_STORAGE
permission
#1473
Comments
Hi, I think this is related to my error:
Which crashed my app. If this will fix the issue, I think it should be added, or at least documented that permissions are required. |
You need permission to read sd files directly, but the images returned from the system album are automatically cached in the app cache directory, so you do not need permission to read images. |
Right. Turns out, as of Android API 33, we need to explicitly ask for permissions in the <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> and in Dart: import "package:permission_handler/permission_handler.dart";
if (await Permission.photos.request().isGranted) {
// ...
} |
have fun. |
The use of |
This issue is stale because it has been open for 7 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Instead of using
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)
,use
context.getExternalCacheDir()
so we don't need
Manifest.permission.READ_EXTERNAL_STORAGE
.The text was updated successfully, but these errors were encountered: