展会信息港展会大全

Android Intent 发送邮件代码
来源:互联网   发布日期:2016-01-14 09:17:17   浏览:3597次  

导读:[代码]Android Intent1Intent i =newIntent(Intent.ACTION_SEND);2//i.setType(text/plain); //use this line for testing in the emulator3i.setType(message/rfc822) ;// use from live d......

[代码] Android Intent

1

Intent i = new Intent(Intent.ACTION_SEND);

2

//i.setType("text/plain"); //use this line for testing in the emulator

3

i.setType("message/rfc822") ; // use from live device

4

i.putExtra(Intent.EXTRA_EMAIL, new String[]{"test@gmail.com"});

5

i.putExtra(Intent.EXTRA_SUBJECT,"subject goes here");

6

i.putExtra(Intent.EXTRA_TEXT,"body goes here");

7

startActivity(Intent.createChooser(i, "Select email application."));

赞助本站

人工智能实验室

相关热词: Intent 发送邮件 代码

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港