Post Email from App, but stay in the app ?

  • Replies:2
mcfly
  • Forum posts: 286

Feb 3, 2012, 3:57:48 PM via Website

Hi All

I try to send an Email from my App. For that I call an startActivity(emailIntent).
This works well, but after I sent the email i am back on the android desktop. I like to stay in my app.
Do you have any suggestions ?
Regards and good weekend.

Code:
1public boolean onOptionsItemSelected(MenuItem item) {
2 switch (item.getItemId()) {
3
4case R.id.contact:
5
6 Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
7 String aEmailList[] = { "mymail@gmail.com" };
8 emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
9 emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Hello Developer");
10
11 emailIntent.setType("plain/text");
12 emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
13
14 startActivity(emailIntent);
15break;

— modified on Feb 3, 2012, 3:58:17 PM

Reply
Eric McBride
  • Forum posts: 1,790

Feb 6, 2012, 12:58:51 PM via Website

Hmm..Im no dev, so its hard for me to respond. Have you posted this question to the devs on XDA?

Reply
mcfly
  • Forum posts: 286

Feb 8, 2012, 6:45:48 AM via Website

Thanks you

I will try there :-)

Regards

Reply