MessengerListener
This API is in beta and subject to change.
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 are received is specified via com.voximplant.android.sdk.core.ClientConfig.callbackExecutor.
Methods
onGetUser
fun onGetUser(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of:
Triggered only on the current user's side.
Parameters
event:
Event object with user data and service information
Returns
type:
Unit
onEditUser
fun onEditUser(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of Messenger.editUser, Messenger.managePushNotifications or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for the subscribers of the changed user. Use Messenger.subscribe to subscribe for user's changes.
Parameters
event:
Event object with user data and service information
Returns
type:
Unit
onSubscribe
fun onSubscribe(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of Messenger.subscribe or analogous methods from other Voximplant SDKs and Messaging API.
Triggered on all logged in clients of the current user
Parameters
event:
Event object with subscription data and service information
Returns
type:
Unit
onUnsubscribe
fun onUnsubscribe(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of Messenger.unsubscribe, Messenger.unsubscribeFromAll or analogous methods from other Voximplant SDKs and Messaging API.
Triggered on all logged in clients of the current user.
Parameters
event:
Event object with subscription data and service information
Returns
type:
Unit
onGetSubscriptionList
fun onGetSubscriptionList(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of the Messenger.getSubscriptionList method call.
Triggered only on the current user's side.
Parameters
event:
Event object with subscription data and service information
Returns
type:
Unit
onCreateConversation
fun onCreateConversation(event: ): Unit
This API is in beta and subject to change.
Triggered when a conversation is created via Messenger.createConversation or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation.
Parameters
event:
Event object with conversation data and service information
Returns
type:
Unit
onRemoveConversation
fun onRemoveConversation(event: ): Unit
This API is in beta and subject to change.
Triggered when a conversation is removed.
Note that removing is possible via Voximplant Messaging API only.
Triggered only for participants that belong to the conversation.
Parameters
event:
Event object with conversation data and service info
Returns
type:
Unit
onGetConversation
fun onGetConversation(event: ): Unit
This API is in beta and subject to change.
Triggered when a conversation description is received as the result of the Messenger.getConversation or Messenger.getConversations methods calls.
Triggered only on the current user's side.
Parameters
event:
Event object with conversation data and service information
Returns
type:
Unit
onGetPublicConversations
fun onGetPublicConversations(event: ): Unit
This API is in beta and subject to change.
Triggered when the list of public conversations UUIDs is received as the result of the Messenger.getPublicConversations method call.
Triggered only on the current user's side.
Parameters
event:
Event object with public conversations UUIDs and service information
Returns
type:
Unit
onEditConversation
fun onEditConversation(event: ): Unit
This API is in beta and subject to change.
Triggered when the conversation properties are modified as the result of:
- Messenger.joinConversation
- Messenger.leaveConversation
- Conversation.update
- Conversation.addParticipants
- Conversation.removeParticipants
- Conversation.editParticipants
- or analogous methods from other Voximplant SDKs and Messaging API
Triggered only for participants that belong to the conversation.
Parameters
event:
Event object with conversation data and service information
Returns
type:
Unit
onSetStatus
fun onSetStatus(event: ): Unit
This API is in beta and subject to change.
Triggered after a user status is changed via Messenger.setStatus or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for the subscribers of the changed user. Use Messenger.subscribe to subscribe for a user's changes.
Parameters
event:
Event object with user status data and service information
Returns
type:
Unit
onEditMessage
fun onEditMessage(event: ): Unit
This API is in beta and subject to change.
Triggered when a message is edited via Message.update 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:
Event object with message data and service information
Returns
type:
Unit
onSendMessage
fun onSendMessage(event: ): Unit
This API is in beta and subject to change.
Triggered when a new message is sent to a conversation via Conversation.sendMessage or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation.
Parameters
event:
Event object with message data and service information
Returns
type:
Unit
onRemoveMessage
fun onRemoveMessage(event: ): Unit
This API is in beta and subject to change.
Triggered when a message is removed from a conversation via Message.remove 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:
Event object with message data and service information
Returns
type:
Unit
onTyping
fun onTyping(event: ): Unit
This API is in beta and subject to change.
Triggered when some user is typing text in a conversation. Information about typing is received via Conversation.typing or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation where typing is performing.
Parameters
event:
Event object with conversation UUID and service information
Returns
type:
Unit
isRead
fun isRead(event: ): Unit
This API is in beta and subject to change.
Triggered for all clients in the conversation as the result of Conversation.markAsRead or analogous methods from other Voximplant SDKs and Messaging API.
Parameters
event:
Event object with conversation UUID and service information
Returns
type:
Unit
onError
fun onError(event: ): Unit
This API is in beta and subject to change.
Triggered 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:
Event object with error details and service information
Returns
type:
Unit
onRetransmitEvents
fun onRetransmitEvents(event: ): Unit
This API is in beta and subject to change.
Triggered as the result of the following methods calls on some conversation for this SDK instance:
Triggered only on the current user's side.
Parameters
event:
Event object with retransmitted events and service information
Returns
type:
Unit