Dhaval2404 / ImagePicker

📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android 10 permission issue

jonandersen opened this issue · comments

Hi there!

Thanks for making this great library! I ran into some issues when using the library for Android 10. It's related to the file permission and the changes that have been made to it. The latest version uses scoped permissions for data storage: https://developer.android.com/training/data-storage/files/external-scoped

I'm not 100% sure if I need to update something on the caller side or if the library needs some changes. I was able to temporarily getting the library working by adding android:requestLegacyExternalStorage="true" to my manifest.

@jonandersen Thank you so much for the suggestions!

I think I was a little unclear above, the library doesn't work on Android 10 unless the legacy storage is enabled.

@jonandersen after your comment only I got to know that it's not working in android 10. For now, I will add your comment inside readme file for anyone who is facing this issue.

In the upcoming days, I will add support for android 10.

Thank you so much!

Any update on the support of Android 10 and higher?

Please note that scoped storage will most likely be mandatory on Android 11.

@JarnoVgr I'm planning to release it with v1.8. So It may take time(About a month). Currently, I'm working on v1.7.

thanks, I'm also facing with this issue

Any Update on android 10 or higher ?
Your apis never return to onActivityResult(...) after taking picture
I have enables android:requestLegacyExternalStorage="true" but does not work

android:requestLegacyExternalStorage="true" won't work anymore for Android 11 and above see here

commented

I have got permission not allowed on Android 11. I did check that it's approved, But the lib still return false. Have anyone facing this error?

any solution?

Any update on this?

We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.

Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either:

Update your app to use more privacy-friendly best practices, such as the Storage Access Framework or Media Store API
Update your app to declare the All files access (MANAGE_EXTERNAL_STORAGE) permission in the manifest file, and complete the All files access permission declaration in Play Console from May 5th
Remove the All files access permission from your app entirely
For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.

Apps requesting access to the All files access permission without a permitted use will be removed from Google Play, and you won't be able to publish updates.
Any changes we have to that. @Dhaval2404 Because after 5 may 2021 our apps will remove from play store and we cannot publish again

@Dhaval2404, any update regarding requestLegacyExternalStorage usage for Android 11? Can we expect any solution before the 5'th of May or we need to switch to another library?

@Dhaval2404 without READ_EXTERNAL_STORAGE && WRITE_EXTERNAL_STORAGE permission can we read images from android or not like so many people are using Intents without permission they are able to pick images.