Mime type for .txt files?

user23 picture user23 · Jan 24, 2013 · Viewed 63.8k times · Source

I´m trying to share a .txt file with share intent. If I set "text/plain" as mime type, it reads the content like text not like text file, then the options given in the share menu are Whatsapp, Line, etc..

Does anybody know how to configure the share intent so that the share options are only the programs that are able to send a .txt file (Gmail, Dropbox, etc.. but not Whatsapp..)? Thanks

Answer

KickAss picture KickAss · Aug 25, 2014

You can try the specific mime:

text/plain

or, the more general text mime:

text/*