January 3, 2010

[SOLVED]Attach a file from SD Card to email




Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent
.setType("plain/text");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "user@host.com" });
sendIntent
.putExtra(Intent.EXTRA_SUBJECT, "Photo");
sendIntent
.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/dcim/Camera/filename.jpg"));
sendIntent
.putExtra(Intent.EXTRA_TEXT, "Enjoy the photo");
startActivity
(Intent.createChooser(sendIntent, "Email:"));


Trying to attach a file from SD Card to email - Stack Overflow.

No comments:

Post a Comment