android - html tags like <b> <i> <a> is not working with HTML.fromHtml() when sent to ACTION_SEND -


when sending html formatted text html.fromhtml() , put intent flag action_send html-formatted string won't displayed correctly default email client devices samsung note 2 , htc devices. if choose gmail app html text rendering fine. tried setting mail size maximum didn't either.

string message = "<p><b><i><a href=\"https://play.google.com/\">my app</a> text.</i></b></p>";  intent email = new intent(intent.action_send); email.putextra(intent.extra_subject, subject); email.settype("message/rfc822"); email.putextra(intent.extra_text, html.fromhtml(message)); startactivity(intent.createchooser(email, "choose email client :")); 

try may useful: first convert string html format:

string message = html.fromhtml("<p><b><i><a href=https://play.google.com/>my app</a> text.<i></b></p>").tostring(); 

then put message method

intent email = new intent(intent.action_send); email.putextra(intent.extra_subject, subject);  email.settype("message/rfc822"); email.putextra(intent.extra_text, message); startactivity(intent.createchooser(email, "choose email client :")); 

thanks....


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -