Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid multiple email attachments using Intent
    primarykey
    data
    text
    <p>I've been working on Android program to send email with an attachment (image file, audio file, etc) using Intent with <code>ACTION_SEND</code>. The program is working when email has a single attachment. I used <code>Intent.putExtra(android.content.Intent.EXTRA_STREAM, uri)</code> to attach the designated image file to the mail and it is working fine, the mail can be delivered through the Gmail. However, when I tried to have multiple images attached to the same mail by calling <code>Intent.putExtra(android.content.Intent.EXTRA_STREAM, uri)</code> multiple times, it failed to work. None of the attachment show up in the email. </p> <p>I searched the SDK documentation and Android programming user group about email attachment but cannot find any related info. However, I've discovered that there's another intent constant <code>ACTION_SEND_MULTIPLE</code> (available since API level 4) which might meet my requirement. Based on SDK documentation, it simply states that it deliver multiple data to someone else, it works like <code>ACTION_SEND</code>, except the data is multiple. But I still could not figure out the correct usage for this command. I tried to declare intent with <code>ACTION_SEND_MULTIPLE</code>, then call <code>putExtra(EXTRA_STREAM, uri)</code> multiple times to attach multiple images, but I got the same erroneous result just like before, none of the attachment show up in the email. </p> <p>Has anyone tried with <code>ACTION_SEND_MULTIPLE</code> and got it working with multiple email attachment?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload