Open WenLonG12345 opened 3 years ago
Hello @WenLonG12345 , Thanks for reporting your issue. I would be happy to help you out with this. Can you give me a little more detail about your problem? Specifically, any error logs, your initiation code, any observations, etc would really be a big help. Thanks,
Hi, thanks for replying. I just clone your sample project, and then observe that the SDK version is 30 and run the app. There is files in .pdf, .doc and .xlsx I am here to attach some screenshot to illustrate my problem.
As you can see, all the pdf, doc and even xlsx is missing. I think it was because of Android 11's scoped storage.
Thanks for the screenshots @WenLonG12345 .
If you have just cloned the sample project and have not made any changes, then I suggest you check the setFilters
setter in the initialization.
UnicornFilePicker.from(MainActivity.this)
.addConfigBuilder()
.selectMultipleFiles(true)
.showOnlyDirectory(true)
.setRootDirectory(Environment.getExternalStorageDirectory().getAbsolutePath())
.showHiddenFiles(false)
.setFilters(new String[]{"pdf", "png", "jpg", "jpeg"})
.addItemDivider(true)
.theme(R.style.UnicornFilePicker_Dracula)
.build()
.forResult(Constants.REQ_UNICORN_FILE);
the sample project is set to display only pdfs and images. You can omit the filters altogether and the file picker will by default show all the files in your directory. Please look into this and check if this solves your issue.
This definitely might be the problem caused by Android 11's scoped storage for which there is no support as of now. I am still working on it and I welcome any helpful PRs. I will put this on the roadmap. Thanks.
I did try to add difference extension such as "xlsx", "docx", etc. but it is not working. Thanks for putting this issue up. and also, I have also no clue for the scoped storage. It makes the working so complicated even if I am using a default file picker. Will return back to you if I got any brilliant idea to share or any solution for this. Thank you 👍
same issue here. i have tried 2 devices with 2 different android Version. SDK 30 cannot be found for file. Please release ASAP
found same issue, but I also notice that the issue occurred in android 11 using SDK 30 because of scope storage
This file picker is made for Android on 2021 but still it DOES NOT WORK on scoped storage! Soon every library is forced to use scoped storage. Hope you find time to work with this Mr. Wen.
@MKickelberg I think there is no custom 3rd party file picker for scoped storage on Android 11 yet. Official documentation suggest to use System picker and you might currently use it instead of any 3rd party library
I can't able to see even images also in android 28 OS.
Hi, I really love your design for this file picker. However, the project that I implemented with this library cannot find document-related file such as .pdf, .doc, .xlsx, .zip , etc.
I am now using SDK 30, only image/video-related file displayed.
Do you mind to help me to check it out?