sending email in android application -
i want send email in android application, had tried
below code:
btnfeedbacksubmit.setonclicklistener(new onclicklistener() { @override public void onclick(view arg0) { // todo auto-generated method stub intent email = new intent(intent.action_send); email.settype("text/email"); email.putextra(intent.extra_email, new string[] { "abc@gmail.com" }); email.putextra(intent.extra_subject, "feedback"); email.putextra(intent.extra_text, "hi"); startactivity(intent.createchooser(email, "sending feedback:")); } });
but shows me error "no apps can perform this"
what more should have do???
try code:
intent emailintent = new intent(intent.action_sendto, uri.fromparts( "mailto","abc@gmail.com", null)); emailintent.putextra(intent.extra_subject, "extra_subject"); startactivity(intent.createchooser(emailintent, "send email..."));
Comments
Post a Comment