this is related to question how to open an attachment with my applicacion from within the email app? (mime type, intent filter ...) which I thought I had it solved, but it is not.
I found that some email clients (Samsung Galaxy SII built in email client, for instance) doesn't honor the sendIntent.setType() method and when adding an attachment to an email it is not adding the mime-type specified in the setType method. The consequence is that I cannot open the attachment when the email arrives.
So in order to be able to open an attachment from any email client I think they only way I have is to create a new mime type that is associated to my custom extension.
But I cannot find any way to register a new mime type. I know it can be done as some apps do it (ASTRO File Explorer), but I don't know where else to look for information on adding a new mime type.
EDIT (2012,Oct, 1st) ASTRO File Explorer adds only mime types for its process. They cannot be read outside its process, so I don't have any example where it works.
I have been looking at the MimeTypeMap source code and looks like it only uses a predefined set of mime types and you cannot add a new one.
I tried using reflection (just to check) and was able to add a mime type, BUT it is only visible to my process, as if my process had its own copy of the MimeTypeMap, so the email client will still not open the attachment.
someone can help?
thanks in advance