Posted on 2013-02-20 11:06
PHP博客 阅读(1051)
评论(0) 编辑 收藏 引用 网摘
Intent sendMSGIntent = new Intent(Intent.ACTION_SEND);
sendMSGIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//sendMSGIntent.putExtra("address", "10086");
//sendMSGIntent.putExtra("subject", "发送彩信");
//sendMSGIntent.putExtra("sms_body", "this is mms send auto ");
sendMSGIntent.putExtra("compose_mode", false);
sendMSGIntent.putExtra("exit_on_sent", true);
//添加照片等附件
sendMSGIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(dirPath)));//dirPath为一个sdcard地址如:"/sdcard/Myshares/Myphotos/m.jpg"
sendMSGIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
//设置文件类型
sendMSGIntent.setType("image/jpeg");
//开启发送彩信的页面
startActivity(sendMSGIntent);
Android相关内容: