码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2014-12-23 21:06:55      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:

Intent email = new Intent(android.content.Intent.ACTION_SEND);
email.setType("plain/text");
String[] emailReciver = new String[] { "earshore@gmail.com" };
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."));

 

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

标签:

原文地址:http://www.cnblogs.com/earshore/p/4180757.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!