Add image to email intent in Android

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");
keyboard_arrow_up
sponsored
Exit mobile version