public function addDialogListener(listener:Function):GVMailDispatcher
Convenience method that adds an event listener for when a send mail dialog request is completed. This listener will be a weak reference and automatically removed after dispatch. For backwards compatibility, GoViral.goViral
will also dispatch the related event.
The listener parameter should take the form of function(e:GVMailEvent) {}
. You may check the value of e.type
which will be either GVMailEvent.MAIL_SENT
if the dialog completed successfully, GVMailEvent.MAIL_CANCELED
if the dialog was canceled, GVMailEvent.MAIL_SAVED
if the user saved the mail to send later, or GVMailEvent.MAIL_FAILED
if the dialog was not displayed successfully.
Parameters
| listener:Function — the event listener function, should take GVFacebookEvent as a parameter
|
ReturnsSee also
Event Object Type: com.milkmangames.nativeextensions.events.GVMailEvent
Dispatched when a mail dialog is cancelled
Event Object Type: com.milkmangames.nativeextensions.events.GVMailEvent
Dispatched when an email dialog fails
Event Object Type: com.milkmangames.nativeextensions.events.GVMailEvent
Dispatched when the user saves an email
Event Object Type: com.milkmangames.nativeextensions.events.GVMailEvent
Dispatched when the user sends an email