registerSendMessageCallback

Registers the specified callback to be called when a message is added with the MessageState.OUTGOING_QUEUED state. This will replace a previously registered callback.

When the registered callback returns true the message state is changed to MessageState.OUTGOING_SENDING, otherwise it is changed to MessageState.OUTGOING_FAILED.

Return

The previously registered callback, or null when no callback was previously registered.

Parameters

callback

The callback to call for a new outgoing message.