开发者

Open Email Application in Android

I have a textView of text email id, when I click the ema开发者_Go百科il id, I want to open a email app which is located in the device, and in the "To" address bar should be filled with the clicked email id.


maybe this will help

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

emailIntent .setType("plain/text");
emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"webmaster@website.com"});
emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, mySubject);
emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, myBodyText);

context.startActivity(Intent.createChooser(intent, "Send mail...));

stolen from link

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜