Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Conversation

@alenz316
Copy link

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).

@alainpimentel
Copy link

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!

@alenz316
Copy link
Author

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); 
@alainpimentel
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants