1

I am working on an Android application that needs to request files of any kind to others. For this reason, I am using a code like the following, as per Android documentation:

mRequestFileIntent = new Intent(Intent.ACTION_PICK); mRequestFileIntent.setType(genericMimeType); startActivityForResult(mRequestFileIntent, 0); 

At the beginning I had genericMimeType = "*/*", but the problem with this approach is that we can also get results with mime type vnd.android.cursor.item/contact, so a cursor. Is there an easy way to limit the mime type only to files, that for example can be sent as attachments in an email?

1
  • You do not use ACTION_PICK with a MIME type. Use ACTION_GET_CONTENT and */*. Commented May 3, 2016 at 11:57

1 Answer 1

4

A generic mime-type would be :

application/octet-stream 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.