alhazmy13/MediaPicker

getting issue in Android 30

arthtilva opened this issue · 8 comments

I am able to receive the path of images but when i check the file with .exists() it returns false, So not able to display or upload image also.

Having this same issue - where filePath is from the media picker
File file = new File(filePath); file.exists() -> always returns false

@alhazmy13 you haven't released a new version of this library in over 2 years. Can you either release a new version or just mark this repository as read only if you don't have any time to contribute any more?

I also faced the same issue, please try this.

Google has a new feature on Android Q: filtered view for external storage. A quick fix for that is to add this code in the AndroidManifest.xml file:

<manifest ... >
    <!-- This attribute is "false" by default on apps targeting Android Q. -->
    <application android:requestLegacyExternalStorage="true" ... >
     ...
    </application>
</manifest>

@aadityapaliwal94 this will not work if your app targets Android 11:
"After you update your app to target Android 11 (API level 30), the system ignores the requestLegacyExternalStorage attribute when your app is running on Android 11 devices, so your app must be ready to support scoped storage and to migrate app data for users on those devices." https://developer.android.com/training/data-storage/use-cases

Thanks, @prfarlow1. Will check it out.

@Drjacky I think Your lib that doesn't support multiple image selection.

@arthtilva I couldn't run that project; It's super old.
Does it allow multiple selections AND CROP at the same time? Or just multiple selections?