当我尝试发送电子邮件意向时,无论我使用INTENT.ACTION_SEND还是使用ACTION.SENDTO并使用股票Sony Xperia Active电子邮件客户端,主题和收件人都显示很好,但是除了客户粘贴的标准评论外,其他人的身体都是空的。在我的三星Galaxy Note 2上,相同的代码就像魅力一样。使用意向时电子邮件正文不显示
if(mPrefs.getBoolean("alternative_email_client", false)){
Intent send = new Intent(Intent.ACTION_SENDTO);
String uriText = "mailto:" + Uri.encode(emailStrings[6]) +
"?subject=" + Uri.encode("The subject") +
"&body=" + Uri.encode(emailBody);
Uri uri = Uri.parse(uriText);
send.setData(uri);
startActivity(Intent.createChooser(send, "Email verschicken"));
} else {
Intent send = new Intent(Intent.ACTION_SEND);
send.putExtra(Intent.EXTRA_EMAIL, emailStrings[6]);
send.putExtra(Intent.EXTRA_SUBJECT, "The Subject");
send.putExtra(Intent.EXTRA_TEXT, emailBody);
startActivity(Intent.createChooser(send, "Email verschicken"));
}
好吧,这有助于身体,但使用这个我得到一个新的问题:收件人不见了。如何解决这个问题? – neominik 2013-05-15 10:39:00
奇怪。我尝试过使用Gmail,我确实看到了收件人。你想从哪个应用发送电子邮件? – 2013-05-16 00:22:37
这也适用于我:我忘记为EXTRA_EMAIL使用字符串数组。它不适用于单个字符串。 – neominik 2013-05-21 10:40:08