android-multipicker-library icon indicating copy to clipboard operation
android-multipicker-library copied to clipboard

How to set few MIMEs type, not */*

Open lovely-karn opened this issue 6 years ago • 1 comments

How can we set few MIME type ? listing various solutions which i came across but none worked for me. 1. filePicker.setMimeType("application/pdf,image/"); 2. filePicker.setMimeType("application/pdf;image/"); 3. filePicker.setMimeType("application/pdf|image/"); 4. one solutions says to pass array of mime type - String[] mimetypes = {"image/", "application/pdf"}; intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);

but as per filePicker.setMimeType() declaration, which is- void setMimeType(String mimeType); so by no way i can pass array of MIME.

5. one solution was filePicker.setMimeType("*/*"); but my query is to allow only few MIME for eg- allow files with extensions ( .pdf & image extensions ) and disallow files with extensions - .xls, .apk , .mp3 etc.

Can we get a solution to set MIME type to few MIMEs?

lovely-karn avatar Jul 10 '18 12:07 lovely-karn

The problem is, other applications don't behave in a single way. However, will try to get some fixes around this problem.

coomar2841 avatar Aug 13 '18 18:08 coomar2841