Surprisingly, this topic seems to be still in it's infancy. There are very 
few posts, and those who have given it a shot have given up since it didn't 
work.

I need to attach multiple files of different types in a single e-mail. File 
types could be image, audio, video, zip, doc, and so on.
I did give it a shot. 


// List<String> filePaths;

Intent emailIntent = new 
Intent(android.content.Intent.ACTION_SEND_MULTIPLE);

// I tried both the following lines
emailIntent.setType("*/*"); 
emailIntent.setType("vnd.android.cursor.dir/email");

// has to be an ArrayList
ArrayList<Uri> uris = new ArrayList<Uri>();
//convert from paths to Android friendly Parcelable Uri's
for (String file : filePaths)
{
     File fileIn = new File(file);
     Uri u = Uri.fromFile(fileIn);
     uris.add(u);
}

emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
context.startActivity(Intent.createChooser(emailIntent, "blah blah"));


Overall, it looks like it's working. The 'createChooser' gives me a list of 
available e-mail apps.
 If I choose "GMail" app from the list, in the 'compose' activity, I can 
see the attachments also. I then hit 'send'.
But when I receive the mail, I find no attachments.

If I see the "sent" folders of Gmail, this email doesn't have attachments.

So what do I need to do?


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to