ImagePicker icon indicating copy to clipboard operation
ImagePicker copied to clipboard

Not working for Android 10 devices

Open aldrinjoemathew opened this issue 5 years ago • 10 comments

The library doesn't load any images in Android 10 devices.

Setting requestLegacyExternalStorage as true in the manifest is only a workaround and is not a recommended approach going forward (It will be removed from Android 11 onwards). It'd be best if this is fixed at the earliest.

aldrinjoemathew avatar Apr 01 '20 09:04 aldrinjoemathew

This hasn't been fixed yet and more android 10 devices are now available. Was just about to update my app then boom'

KelvinPac avatar May 01 '20 23:05 KelvinPac

Hi @aldrinjoemathew @KelvinPac, Version 1.4.0 is now available! Please read What's new and check if your issue has been fixed!

nguyenhoanglam avatar May 09 '20 08:05 nguyenhoanglam

I tried on android 10 with 1.4.0. It doesn't load.

shree-vastava avatar May 23 '20 06:05 shree-vastava

same here issues

odisoedim avatar Jun 05 '20 05:06 odisoedim

I am using version 1.4.3 still having an issue with captured image from Camera in Android 10 Would you please update on this?

ParryPatel021 avatar Sep 10 '20 14:09 ParryPatel021

I'm also using version 1.4.3 and testing with an OnePlus 5T with Android 10 is working ok, @ParryPatel021 can you give more info about your issue?, like which phone model, or the stacktrace of the error, i suppose that would be helpful for the developers of this library

alejandro-rios avatar Sep 13 '20 00:09 alejandro-rios

I'm also using version 1.4.3 and testing with an OnePlus 5T with Android 10 is working ok, @ParryPatel021 can you give more info about your issue?, like which phone model, or the stacktrace of the error, i suppose that would be helpful for the developers of this library

The issue the library cannot return the file path in path property available in Image Model and this is faced in device Nokia 5.1 having Android 10.

ParryPatel021 avatar Sep 13 '20 12:09 ParryPatel021

For security reasons you can't get the file path but you can get file Uri. Using this you can convert the Uri to file (Need to create a new file) or byte array. Using this both solution you can upload the image

I have implemented those solutions in my new library. You can check the methods.

https://github.com/shaon2016/ProPicker

shaon2016 avatar Oct 26 '20 09:10 shaon2016

This answer https://stackoverflow.com/a/9989900 worked for me when you want to extract the file path from the uri for Android 10 devices and up.

riocallos avatar Feb 08 '21 09:02 riocallos

Just built a library to support Android 11. Tested on Android 10 (device) and Android 11 (Simulator): https://github.com/ming-xi/MXMediaPicker

ArchangelXu avatar Mar 04 '21 10:03 ArchangelXu