开发者

Sending email without Intent.createChooser

I would like my email to be sent without开发者_运维技巧 having the email client ot open on the Android screen.

my code is standard:

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{addresses});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(emailIntent, "Send mail..."));

How to? Thanks. Charles.


Refer This. might be helpful

It will open up email application in real device. In emulator it doesn't work, many people have faced this & found this working.

-Thanks

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜