Possible Duplicate:
Android: How do I attach a temporary, generated image to an email?
I am trying to send image as email attachment programmatically, email is sent from my side, but doesnot go to my email inbox.
Possible Duplicate:
Android: How do I attach a temporary, generated image to an email?
I am trying to send image as email attachment programmatically, email is sent from my side, but doesnot go to my email inbox.
Simply try this one -
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[]{"email"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Test");
//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(emailIntent);
Have a look at this answer Hope this helps you