My goal: Open a "compose email" activity and then determine whether
the email was sent.
I open the email app with this:
Intent msg=new Intent(Intent.ACTION_SEND);
String emailSubject = "Hello!";
String emailBody = "Insert body text here.....";
msg.putExtra(Intent.EXTRA_EMAIL, new String[]
{"[email protected]"} );
msg.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
msg.putExtra(Intent.EXTRA_TEXT, emailBody);
msg.setType("message/rfc822");
startActivityForResult(msg, REQUEST_CODE_SEND_EMAIL);
I send the intent with startActivityForResult, because I would like
to know wether the email was actually send.
Works fine until here, the email app starts and I see my text ....
Now I either press "Send" or "Save as draft" or "Discard"... I recieve
the email just fine...
But in my onActivityResult-method, the resultCode seems to be always
0 ( RESULT_CANCEL), even if the email was actually sent.
Does anyone have an explanation for this? Or a fix?
Thx!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---