I think email applications do not have full html support. I have the following code:
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto","", null)) .putExtra(Intent.EXTRA_SUBJECT, "LIJSTJE fb") .putExtra(Intent.EXTRA_TEXT, Html.fromHtml(new StringBuilder() .append("<p style='font-weight:bold;'>Some Content</p>") .append("<a>http://www.google.com</a><br/>") .append("<a href='http://www.facebook.com'>facebook</a>") .append("<small><p>More content</p></small>") .toString())); startActivity(Intent.createChooser(emailIntent, "Send email..."));
Items and new lines are added as expected. Style, however, is not. Also, when you type the full URL, you get a link, but when you do it like a facebook link, you donβt.
I suspect that the email client on the phone removes the styles and makes the link to the visible text a link. Thus, the user knows where the link goes. Also, if you think about it, the native gmail application has no style options. Thus, this can erase the style of styles.
At least my theory. :)
(NOTE: I tested only in the Gmail app!)
I also changed the Intent type from SEND to SENDTO so that it only uses email clients and not other applications. And I deleted the setType () method, because when you use it, you get an "application not found" error.
source share