howljs / hl_image_picker

Simplify media selection, cropping, and camera functionality in your Flutter app. Choose images/videos from the library, crop images, and capture new photos/videos with ease.
https://pub.dev/packages/hl_image_picker
20 stars 12 forks source link

Android 10 external storage access error #22

Closed p-shapovalov closed 5 months ago

p-shapovalov commented 5 months ago

You can see a similar bug here https://github.com/flutter/flutter/issues/41459 The solution is to put the result files in the application cache instead of external storage I've pushed a quick fix here https://github.com/p-shapovalov/hl_image_picker/tree/android-10-quick-fix, I take it from https://github.com/flutter/packages/blob/main/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/FileUtils.java But for now I don't have time to implement it correctly, so I just replace image compressing with moving it into app cache