Rate this page:

IMessengerListener

Interface that may be used to handle messenger events.

Methods are invoked either on:

  • the current user's side only. The events always invoked only on a client where messaging methods are called (unless otherwise specified).
  • or both current user's and other participants' sides.

See the details in the methods' descriptions.

An executor on which all events will be received is specified via Voximplant.getClientInstance(Executor, Context, ClientConfig).

Methods

isRead

Copy URL

void

isRead(

IConversationServiceEvent

event
)

Invoked for all clients in the conversation as the result of IConversation.markAsRead(long, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Parameters

Returns

  • type:

    void

onCreateConversation

Copy URL

void

onCreateConversation(

IConversationEvent

event
)

Invoked when a conversation is created via IMessenger.createConversation(ConversationConfig, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

Parameters

Returns

  • type:

    void

onEditConversation

Copy URL

void

onEditConversation(

IConversationEvent

event
)

Parameters

Returns

  • type:

    void

onEditMessage

Copy URL

void

onEditMessage(

IMessageEvent

event
)

Invoked when a message was edited via IMessage.update(String, List, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the changed message.

Parameters

  • Event object with message data and service information

Returns

  • type:

    void

onEditUser

Copy URL

void

onEditUser(

IUserEvent

event
)

Invoked as the result of IMessenger.editUser(Map, Map, IMessengerCompletionHandler), IMessenger.managePushNotifications(List, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user. Use IMessenger.subscribe(List, IMessengerCompletionHandler) to subscribe for user's changes.

Parameters

  • Event object with user data and service information

Returns

  • type:

    void

onError

Copy URL

void

onError(

IErrorEvent

event
)

Invoked when an error occurred as the result of any Voximplant Android Messaging API methods call.

Triggered only on the current user's side.

Parameters

  • Event object with error details and service information

Returns

  • type:

    void

onGetConversation

Copy URL

void

onGetConversation(

IConversationEvent

event
)

Invoked when a conversation description is received as the result of the IMessenger.getConversation(String, IMessengerCompletionHandler) or IMessenger.getConversations(List, IMessengerCompletionHandler) methods calls.

Triggered only on the current user's side.

Parameters

Returns

  • type:

    void

onGetPublicConversations

Copy URL

void

onGetPublicConversations(

IConversationListEvent

event
)

Invoked when the list of public conversations UUIDs is received as the result of the IMessenger.getPublicConversations(IMessengerCompletionHandler) method call.

Triggered only on the current user's side.

Parameters

Returns

  • type:

    void

onGetSubscriptionList

Copy URL

void

onGetSubscriptionList(

ISubscriptionEvent

event
)

Invoked as the result of the IMessenger.getSubscriptionList(IMessengerCompletionHandler) method call.

Triggered only on the current user's side.

Parameters

Returns

  • type:

    void

onGetUser

Copy URL

void

onGetUser(

IUserEvent

event
)

Parameters

  • Event object with user data and service information

Returns

  • type:

    void

onRemoveConversation

Copy URL

void

onRemoveConversation(

IConversationEvent

event
)

Invoked when a conversation was removed.

Note that removing is possible via Voximplant Messaging API only.

Triggered only for participants that belong to the conversation.

Parameters

Returns

  • type:

    void

onRemoveMessage

Copy URL

void

onRemoveMessage(

IMessageEvent

event
)

Invoked when a message was removed from a conversation via IMessage.remove(IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the deleted message.

Parameters

  • Event object with message data and service information

Returns

  • type:

    void

onRetransmitEvents

Copy URL

void

onRetransmitEvents(

IRetransmitEvent

event
)

Parameters

  • Event object with retransmitted events and service information

Returns

  • type:

    void

onSendMessage

Copy URL

void

onSendMessage(

IMessageEvent

event
)

Invoked when a new message was sent to a conversation via IConversation.sendMessage(String, List, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

Parameters

  • Event object with message data and service information

Returns

  • type:

    void

onSetStatus

Copy URL

void

onSetStatus(

IStatusEvent

event
)

Invoked after a user status was changed via IMessenger.setStatus(boolean, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user. Use IMessenger.subscribe(List, IMessengerCompletionHandler) to subscribe for a user's changes.

Parameters

  • Event object with user status data and service information

Returns

  • type:

    void

onSubscribe

Copy URL

void

onSubscribe(

ISubscriptionEvent

event
)

Invoked as the result of IMessenger.subscribe(List, IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user

Parameters

Returns

  • type:

    void

onTyping

Copy URL

void

onTyping(

IConversationServiceEvent

event
)

Invoked when some user is typing text in a conversation. Information about typing is received via IConversation.typing(IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation where typing is performing.

Parameters

Returns

  • type:

    void

onUnsubscribe

Copy URL

void

onUnsubscribe(

ISubscriptionEvent

event
)

Invoked as the result of IMessenger.unsubscribe(List, IMessengerCompletionHandler), IMessenger.unsubscribeFromAll(IMessengerCompletionHandler) or analogous methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user.

Parameters

Returns

  • type:

    void