image-chooser-library icon indicating copy to clipboard operation
image-chooser-library copied to clipboard

Android 10 ChooserException

Open AsynctaskCoffee opened this issue 4 years ago • 7 comments

com.kbeanie.imagechooser.exceptions.ChooserException: Error creating directory: /storage/emulated/0/bichooser

AsynctaskCoffee avatar Apr 28 '20 12:04 AsynctaskCoffee

It is not working on Android 10 devices. (I have tested with Honor20, Mi9T and Nova5i)

AsynctaskCoffee avatar Apr 28 '20 12:04 AsynctaskCoffee

Yes, I am also facing the same issue

balavishnu avatar Jun 28 '20 15:06 balavishnu

@AsynctaskCoffee Did some search and found that its a change in Android 10 and above. Need to add android:requestLegacyExternalStorage="true" to your element in the manifest. More details in the below link

https://stackoverflow.com/questions/58379543/cant-create-directory-in-android-10

balavishnu avatar Jun 28 '20 16:06 balavishnu

@balavishnu Thank you for your valuable help. This is the definitive solution, I've solved the problem in the same way. :)

AsynctaskCoffee avatar Jul 01 '20 17:07 AsynctaskCoffee

Need to add a fix for the android 10(target SDK 30) in FileUtils class.

syedsamarulhuda avatar Aug 02 '21 05:08 syedsamarulhuda

@AsynctaskCoffee Did some search and found that its a change in Android 10 and above. Need to add android:requestLegacyExternalStorage="true" to your element in the manifest. More details in the below link

https://stackoverflow.com/questions/58379543/cant-create-directory-in-android-10

android:requestLegacyExternalStorage="true" is ignored when target sdk is 30

syedsamarulhuda avatar Aug 02 '21 05:08 syedsamarulhuda

@AsynctaskCoffee Did some search and found that its a change in Android 10 and above. Need to add android:requestLegacyExternalStorage="true" to your element in the manifest. More details in the below link https://stackoverflow.com/questions/58379543/cant-create-directory-in-android-10

android:requestLegacyExternalStorage="true" is ignored when target sdk is 30

Look at: https://developer.android.com/about/versions/11/privacy/storage. 🐰

AsynctaskCoffee avatar Aug 02 '21 09:08 AsynctaskCoffee