I'm sending emails via an Intent. Sometimes they need to have an attachment, but the attachment gets the same MIME type as the main email (message/rf822).
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { address });
intent.putExtra(Intent.EXTRA_TEXT, body);
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
if (fileName != null) {
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + fileName));
}
intent.setType("message/rfc822");
Is there a way to specify the MIME type for the attachment ?