i am able to send mail using below my code ,but by default after click on send email i am returning to my previous activity means from where my send email action fires but i want to navigate to other activity after sending mail means after click on send button i don’t want to return my previous activity ..so how to do the same,.
than x to all my responder in advance..hope i will get solution here
my code for sending mail is below:
Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "testing email send.");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<b>this is html text in email body.</b>"));
startActivity(Intent.createChooser(emailIntent, "Email to Friend"));
in this code using startActivity(Intent.createChooser(emailIntent, “Email to Friend”)); this a mail page is open with the title and body and after writing on “TO”(whom to send mail) and click on send mail send and i navigate to my previous actitivity but i want to go other activity…
**means how to handle button send on send email activity**
You can start the email activity with
startActivityForResult(Intent, int requestCode)method and then start the activity you want to appear after the email has been sent (or not sent, actually) fromonActivityResult()method