The ACTION_SEND protocol doesn't return a result, so you are just getting the default result.
On Wed, Jan 28, 2009 at 11:52 AM, Noonien Soong <[email protected]>wrote: > > 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! > > > > > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

