0
我的目标是打开带有图像的html文件(图像链接可在html页面中找到)。在Android中-----如何在邮件正文中打开html图像?
Intent shareIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"));
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "The Subject");
shareIntent.putExtra(Intent.EXTRA_TEXT,Html.fromHtml(new StringBuilder().append("<p><b>Some Content</b></p>").append("<small><p>More content</p></small>").append("<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/Wiktionary_small.svg/350px-Wiktionary_small.svg.png\"/>").toString()));
startActivity(shareIntent);
我尝试但它不显示图像,但显示obj。
谢谢jatin但其只开放w3school的链接。 – patel
嘿,我认为你需要改变你的链接的静态链接,你的图像在那里 –
我尝试,但它没有奏效。 – patel