Android-FilePicker
Android-FilePicker copied to clipboard
Not working for android 10 documents
working fine on below 10 devices but on android 10 only images and videos are showing.
document not selectable in Android 10 it's Only show images & Video can you please Fix it..?
same bug
I am able to see files in emulator. Can you list what configuration are you using?
Android 10 API 29, samsung A 50, same for galaxy s10 emulator by genymotion
I am able to see files in emulator. Can you list what configuration are you using?
i cant understand what configuration are you talking about. i am using Asus zenfone 6, 5z, galaxy s10 and redmi note 8 pro all device have android 10 and all device doesn't support docs.
I am talking about Filepicker configuration you are using for querying filetypes?
well, I'm using your unmodified demo
public void onPickDoc() { String[] zips = {"zip", "rar"}; String[] pdfs = {"pdf"}; int maxCount = MAX_ATTACHMENT_COUNT - photoPaths.size(); if ((docPaths.size() + photoPaths.size()) == MAX_ATTACHMENT_COUNT) { Toast.makeText(this, "Cannot select more than " + MAX_ATTACHMENT_COUNT + " items", Toast.LENGTH_SHORT).show(); } else { FilePickerBuilder.getInstance() .setMaxCount(maxCount) .setSelectedFiles(docPaths) .setActivityTheme(R.style.FilePickerTheme) .setActivityTitle("Please select doc") .addFileSupport("ZIP", zips) .addFileSupport("PDF", pdfs, R.drawable.pdf_blue) .enableDocSupport(true) .enableSelectAll(true) .sortDocumentsBy(SortingTypes.name) .withOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) .pickFile(this); } }
with the last commit, does not work
I tried on a real device and observed that MediaStore don't list all types of files in Android 10 (just the media files). You'll need to enable android:requestLegacyExternalStorage="true"
for showing files on android 10 device. This document picker will get deprecated soon over scoped storage and also, this flag will not work in Android 11. :/
it works well now on Android 10
I tried on a real device and observed that MediaStore don't list all types of files in Android 10 (just the media files). You'll need to enable
android:requestLegacyExternalStorage="true"
for showing files on android 10 device. This document picker will get deprecated soon over scoped storage and also, this flag will not work in Android 11. :/
Do you have any permanent solution ? or we need to find ourselves. By d way you already did a great help
@br-neeraj I dont think there are any more hacks to it for showing on Android 10 or above devices. I tried almost everything. There is no app that is being able to list files without this flag. and by Android 11, they will have to switch to OS file picker too. You will not to able to filter like this. However, If you find something..please raise PR ...will be happy to merge it.
@br-neeraj I dont think there are any more hacks to it for showing on Android 10 or above devices. I tried almost everything. There is no app that is being able to list files without this flag. and by Android 11, they will have to switch to OS file picker too. You will not to able to filter like this. However, If you find something..please raise PR ...will be happy to merge it.
Firstly, Thanks for this Library.
This Segregation of Showing PDF, WORD, EXCEL, PPT in the Picker worked really well for my app. Now as I'm Porting my code to support Android 11. I Realize we need to use Storage Access Framework as suggested by official docs.. but do let us know if using this Document Picker in current form if possible in Andorid 11 ?
Also, In Any case I guess only Document Picker might get deprecated in this library ? not anything else, as my app still use this library. Please share with us a detailed Explanation on ReadMe about how things will look like on >=Android11 . As, now is the time we start writing support for Andorid 11.
Thanks Again.
document not showing in Android 10 API 30, Samsung Galaxy Note 10+
---Not working
String[] docs = {".doc", ".docx"};
String[] pdfs = {".pdf"};
FilePickerBuilder.getInstance()
.setMaxCount(1)
.setActivityTitle("Select file")
.addFileSupport("PDF", pdfs, R.drawable.pdf)
.addFileSupport("DOC", docs, R.drawable.doc)
.enableDocSupport(true)
.enableSelectAll(false)
.sortDocumentsBy(SortingTypes.name)
.withOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
.pickFile(LeadDocumentListFragment.this, PICK_FILE);