How to send email with image icon displayed in body in android

点点圈 提交于 2019-12-06 11:07:34

问题


I have a task about embed an icon in Gmail body with HTML tag. But when i do, it only display an image with the text OBJ inside (as same as here) I wonder that does Android support displaying image in Gmail body android? Here is my code:

String htmlSendMail = "<img src= " + (char) 34 + status.getUser().getProfileImageURLHttps() + (char) 34 + " />";
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, 
                       "Tweet from " + name + "(@" + screenName + ")");
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(htmlSendMail));
startActivity(Intent.createChooser(emailIntent, "Send mail via..."));

来源:https://stackoverflow.com/questions/20086975/how-to-send-email-with-image-icon-displayed-in-body-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!