boldText:" I tried below also but not working. String mailContent = "boldText:" Email intent. Intent sen" /> boldText:" I tried below also but not working. String mailContent = "boldText:" Email intent. Intent sen" /> boldText:" I tried below also but not working. String mailContent = "boldText:" Email intent. Intent sen"/>

Html.fromHtml not working with bold text in body while share intent in email

1.2k views Asked by At
String mailContent = "<b>boldText:</b>"

I tried below also but not working.

String mailContent = "<strong>boldText:</strong>"

Email intent.

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("text/html");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, 
getResources().getString(R.string.slide3_text1));
sendIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(mailContent));
startActivity(Intent.createChooser(sendIntent, "Send Mail"));

Please check this code not showing bold text in mail. i want to display like below.

Title of Content:

Name

etc...

Title of Content 2:

Name

etc.

Please take look into this and let me know I read many blogs. Thanks in advance.

2

There are 2 answers

0
Vaibhav K On BEST ANSWER

As per R&D, I found that this is not possible in new Gmail because Gmail introduces own editor in the mail. Thanks

7
AudioBubble On

You can use Constant Value: "android.intent.extra.HTML_TEXT" along with EXTRA_TEXT