安卓开发 调用app发送邮件代码

Intent email = new Intent(android.content.Intent.ACTION_SEND);
email.setType("plain/text");
String[] emailReciver = new String[] { "[email protected]" };
String emailSubject = "BrewClock Feedback";
String emailBody = "";
// 设置邮件默认地址
email.putExtra(android.content.Intent.EXTRA_EMAIL, emailReciver);
// 设置邮件默认标题
email.putExtra(android.content.Intent.EXTRA_SUBJECT, emailSubject);
// 设置要默认发送的内容
email.putExtra(android.content.Intent.EXTRA_TEXT, emailBody);
// 调用系统的邮件系统
startActivity(Intent.createChooser(email,
    "Please choose an app to email."));

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。