How to set uncommon file extension in storage access framework?

Viewed 1206

I am developing an android application that creates and opens specific file types. I am using Storage Access Framework to access files for Kitkat or above operating system. Now I need to open .enc files and filter out any other files. Using Storage Access Framework I tried:

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("file/enc");

and

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType(".enc");

but none of them working. Help me please.

1 Answers
Related