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