My app sends an email containing attachments to the users email address. I have set it up as this which works correctly:
var emailDialog = Titanium.UI.createEmailDialog() emailDialog.subject = "Hi There"; emailDialog.toRecipients = ['firstname.lastname@example.org']; emailDialog.messageBody = 'We hope you liked the app, keep in touch'; emailDialog.addAttachment(image); emailDialog.open();My problem is that i need to then run a function once the user has clicked either 'Send' or 'Cancel' - 2 Buttons that are automatically added to the emailDialog when you create it.
How can i attach event listeners on these 2 buttons?
There is a
complete event in the EmailDialog that gets fired when the email dialog has completed sending the email. Also there are constant that you could used for the cancel button like the
CANCELED which is a constant for the CANCELLED status result. Everything is in the Documentation
Think you can help? Login to answer this question!