开发者

Messaging Activity pops up along with mail application in Android

I wrote an email application in Android , that uses Action_SEND intent. When I call startActivity(i); where i is intent, along with email Application , messaging application is also popping up. But when I wrote an application for email why should messaging application also should pop up. can I be explained clearly regarding this concept.

Intent sendIntent = new Intent(Intent.ACTION_SEND);
String[] mailto = recipients;
sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
String[] mailCc = recipientsToBeCopied;
sendIntent.putExtra(Intent.EXTRA_CC, mailCc);
String[] mailBcc = recipientsToBeBlindCopied;
sendIntent.putExtra(Intent.EXTRA_BCC, mailBcc);
String subject = strSubject;
sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
String body = strBody;
sendIntent.putExtra(Intent.EXTRA_TEXT, body);
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "send mail.."));

Can any one tell me reason for using createChooser of intent and also reason for this ap开发者_运维百科plication popping up messaging activity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜