A blog for technology, SEO tips, website development and open source programming.

Image to email intent in Android

0 216

How to add image to an email intent in Android


// build a email sending intent
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("image/png");
// set the email subject
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "email subject");
// set the email image path for the attachment
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + mEmailImagePath));
// set the body of the email
emailIntent.putExtra(Intent.EXTRA_TEXT, "some text message");

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More