【发布时间】:2012-02-01 14:04:48
【问题描述】:
我正在尝试使用intent 从我的应用程序发送电子邮件,但电子邮件的“收件人”字段不会填充。如果我添加代码来填写主题或文本,它们就可以正常工作。只有收件人字段不会填充。
我也尝试将类型更改为“text/plain”和“text/html”,但我遇到了同样的问题。有人可以帮忙吗?
public void Email(){
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("message/rfc822"); //set the email recipient
String recipient = getString(R.string.IntegralEmailAddress);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL , recipient);
//let the user choose what email client to use
startActivity(Intent.createChooser(emailIntent, "Send mail using...")); }
我尝试使用的电子邮件客户端是 Gmail
【问题讨论】:
标签: intent android android-intent