aFileChooser icon indicating copy to clipboard operation
aFileChooser copied to clipboard

Added MIME type filter to FileChooserActivity and company.

Open alenz316 opened this issue 12 years ago • 3 comments

Disables and grays out file entries that do not match the MIME type defined in the original intent type. FileUtils.compareMimeTypes from Android source code (ClipDescription.java).

alenz316 avatar Jan 24 '14 01:01 alenz316

I have been looking in the library, but I can't a function that does this. Currently I hardcoded the type MIME_TYPE_VIDEO in FileUtils.createContentIntent(), but did you write a function that does this or is hardcoding the file type want the only way to do it?

This is a great library BTW!

alainpimentel avatar May 23 '14 16:05 alainpimentel

Sorry for taking so long to respond. You should be able to just set the MIME type on the intent you use to launch the file chooser.

intent.setType(DESIRED_MIME_TYPE);

alenz316 avatar Aug 14 '14 17:08 alenz316

Thank you for the answer. your library helped me a lot

alainpimentel avatar Aug 22 '14 21:08 alainpimentel