ВОЙТИ

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

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

onCreateConversation

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

onEditConversation

void onEditConversation(IConversationEvent event)

Parameters

onEditMessage

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

onEditUser

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

onError

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

onGetConversation

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

onGetPublicConversations

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

onGetSubscriptionList

void onGetSubscriptionList(ISubscriptionEvent event)

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

Triggered only on the current user's side.

Parameters

onGetUser

void onGetUser(IUserEvent event)

Parameters

  • Event object with user data and service information

onRemoveConversation

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

onRemoveMessage

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

onRetransmitEvents

void onRetransmitEvents(IRetransmitEvent event)

Parameters

  • Event object with retransmitted events and service information

onSendMessage

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

onSetStatus

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

onSubscribe

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

onTyping

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

onUnsubscribe

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