Hi everybody,

by using the following code:

Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", 
address, null));
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
Spanned result;

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
    result = Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY);
} else {
    result = Html.fromHtml(text);
}
emailIntent.putExtra(Intent.EXTRA_TEXT, result);

activity.startActivityForResult(Intent.createChooser(emailIntent, "Send 
email..."), requestCode);


I used to be able to create simple html formatted mails, with bold text and 
anchors. 

Unfortunately this code doesn't work anymore when passing the intent to 
Gmail or Inbox.

The mail body only shows plain text, and only text starting with "http://"; 
is shown as link(blue and underlined).

I've tried passing the intent to "MailDroid" app and it still works.

It seems to me that it has to do with some Gmail app update(30 November 
2016), but I was wondering if I could do anything to solve it.

Many Thanks 


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/13b30d27-ecf1-4c2e-9c31-7241f8f3b20e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to