我需要发送附有图片的电子邮件,邮件正文包含两个 links.Everything工作正常,除了链接不工作,但它是 文字正在显示。我尝试通过单一添加两个链接到邮件正文 putExtra方法。
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.setType("application/octet-stream");
emailIntent.setType("image/jpeg");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
"A post card from \"I'm in!\" xyz");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+"tempImage.jpg"));
String temp="Find out more about <a href=\"http://www.xyz.com\"> Greeting Card application</a><br>";
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml("Please visit us at <a href=\"http://www.xyz.com\">www.xyz.com</a>."));
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(temp));
temp="Please visit us at <a href=\"http://www.jxyz.com\"> www.xyz.com <http://www.xyz.com> </a></br>FInd out more about <a href=\"http://itunes.apple.com/gb/app56769?mt=8&ign-mpt=uo%3D2\">I'm In! - Greeting Card</a> application";
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(temp));
startActivityForResult((Intent.createChooser(emailIntent, "Send mail...")),mailSendCode);
谢谢, Kariyachan
答案 0 :(得分:0)
您可以尝试将此链接放入
emailIntent.setType("text/html");
emailIntent.putExtra(Intent.EXTRA_TEXT, temp);