我使用:Android:使用电子邮件意图发送电子邮件,可能在发送之前更改消息?
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
来,我需要一些页脚添加到邮件发送电子邮件,是否有任何监听器或某种方式当用户点击“发送”,我可以编辑短信?
谢谢!
编辑:
下面是我使用的代码:
private void sendEmail(String recipient, String subject, String message) {
try {
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
if (recipient != null) emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{recipient});
if (subject != null) emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
if (message != null) emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
} catch (ActivityNotFoundException e) {
// cannot send email for some reason
}
}
有没有像场:
android.content.Intent.EXTRA_EMAIL
这让我提供信息的意图。
请看我更新的代码,谢谢! – hzxu 2011-06-08 05:00:45
@hzxu见上面 – Aleadam 2011-06-08 05:08:48
嗨,我知道你的意思,但我的意思是总是出现在信息的末尾,例如“由ABC iphone客户端发布”的页脚,当你发布时你看不到它,但它附加在实际的文章中。 – hzxu 2011-06-08 05:13:27