Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Email Multiple Attachment issue on HTC Thunderbolt

Tags:

I have a weird situation here.

I am trying to send emails with multiple attachments using the following piece of code.

Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND_MULTIPLE ); // emailIntent.setType( "plain/text" ); emailIntent.setType( "application/octet-stream" ); ... .... emailIntent.putParcelableArrayListExtra( Intent.EXTRA_STREAM, uris ); 

This works fine and the implicit intent mechanism shows up a lot of options like Gmail, Skype, Messaging etc.

The problem is that the default Mail client does not show up on HTC Thunderbolt ( but works on other devices including HTC Incredible S ).

If I try to send a single attachment using Intent.ACTION_SEND, the default mail client shows up. I have tried setting content type to text/plain, appliation/octet-stream, message/rfc282 etc but none works.

What am I missing here?

like image 245
Mahadevan Sreenivasan Avatar asked Feb 27 '12 06:02

Mahadevan Sreenivasan


1 Answers

I had the same issue, I Fixed it with using http Mime Library for multipart form entity.

here is the link to the file. http://hc.apache.org/httpcomponents-client-4.3.x/httpmime/apidocs/org/apache/http/entity/mime/HttpMultipart.html

like image 147
Umer Kiani Avatar answered Oct 13 '22 00:10

Umer Kiani