IConversationObservable

interface IConversationObservable

This interface is used with the STWMessagingManager in order to delegate some events/actions related to a given conversation ID to the user like :

  1. Message sending in progress (pending)
  2. Message status changed (delivery) :
    • successfully received by server (200ok)
    • failure to receive by server (for exp: 488)
    • not delivered to recipient X
    • delivered by recipient X
    • seen (read receipt) by recipient X
    • read in WebChat
    • acknowledged (OK-message) by recipient X
    • (sync) acknowledged (OK-message) by me
  3. Message successfully deleted
  4. (sync) Message deleted
  5. Message received
  6. (sync) Message received
  7. Conversation name changed
  8. Conversation Group Quit received (SWTo)
  9. (sync) Conversation Group Quit received

See also

Functions

Link copied to clipboard
abstract fun onAckMessageReceived(@NonNull internationalPhoneNumber: String, @NonNull messageIdList: List<String>)
Called when the server sends a list with acknowledged messages.
Link copied to clipboard
abstract fun onAdministratorsRemoved(    @NonNull conversationId: String,     @NonNull removedAdminMsisdnList: List<String>,     @NonNull administratorMsisdn: String)
Called when a list of phone number of admins are demoted as members in this conversation by another administrator
Link copied to clipboard
abstract fun onAssignRegularAdminsCompleted(@NonNull conversationId: String, @NonNull msisds: List<String>)
Called when one or more msisdn are successfully promoted to be admins in the conversation
Link copied to clipboard
abstract fun onAssignRegularAdminsFailed(@NonNull conversationId: String, @NonNull msisds: List<String>)
Called when one or more msisdn are failed to promoted as admins in the conversation
Link copied to clipboard
abstract fun onCloseConversationCompleted(@NonNull conversationId: String)
Called when the client has successfully close a conversation.
Link copied to clipboard
abstract fun onCloseConversationFailed(@NonNull conversationId: String)
Called when an error occurred when the client close a conversation.
Link copied to clipboard
abstract fun onCloseConversationReceived(@NonNull conversationId: String, @NonNull internationalNumber: String)
Called when backend notifies the client that a user has close a conversation.
Link copied to clipboard
abstract fun onConversationListReceived()
Called when backend sends a conversation list.
Link copied to clipboard
abstract fun onConversationNameChanged(    @NonNull conversationId: String,     @NonNull oldConversationName: String,     @NonNull newConversationName: String)
Called when the conversation name is changed.
Link copied to clipboard
abstract fun onDeleteConversationReceived(@NonNull conversationId: String)
Called when a conversation has been deleted from your webChat.
Link copied to clipboard
abstract fun onDeliveryReport(    @NonNull conversationId: String,     @NonNull messageId: String,     @NonNull deliveryReport: DeliveryReport)
Called when a message is delivered to a recipient, whether its a successful or a fail.
Link copied to clipboard
abstract fun onInvitationCompleted(    @NonNull conversationId: String,     @Nullable phoneList: List<String>,     @Nullable groupIdList: List<Long>)
Called when the client has successfully invite new recipients
Link copied to clipboard
abstract fun onInvitationFailed(@NonNull conversationId: String)
Called when an error occurred when the client invite new recipients
Link copied to clipboard
abstract fun onInvitationReceived(    @NonNull conversationId: String,     @Nullable phoneList: List<String>,     @Nullable groupIdList: List<Long>,     @NonNull internationalNumberSender: String)
Called when new recipients( users and / or groups) are added to conversation.
Link copied to clipboard
abstract fun onLeaveConversationCompleted(@NonNull conversationId: String)
Called when the client has successfully left a group.
Link copied to clipboard
abstract fun onLeaveConversationFailed(@NonNull conversationId: String)
Called when an error occurred when the client left a group.
Link copied to clipboard
abstract fun onLeaveConversationReceived(@NonNull conversationId: String, @NonNull internationalNumber: String)
Called when backend notifies the client that a user has left a group.
Link copied to clipboard
abstract fun onMessageDeleted(    @NonNull conversationId: String,     @NonNull deletedMessage: BaseMessage,     deletedMessagePosition: Int)
Called when a message is successfully deleted whether from client to WebChat or the other way around
abstract fun onMessageDeletionPeriodicallyTaskFinished()
Called when the message auto-deletion feature is activated and the deletion operation task has been finished.
Link copied to clipboard
abstract fun onMessageDelivered(@NonNull conversationId: String, @NonNull messageId: String)
Called when a message is successfully delivered to the back-end
Link copied to clipboard
abstract fun onMessageFail(    @NonNull conversationId: String,     @NonNull messageId: String,     error: Int)
Called when a message is failed to deliver to the back-end
Link copied to clipboard
abstract fun onMessageListReceived(@NonNull conversationId: String)
Called when backend sends a message list for the given conversationId.
Link copied to clipboard
abstract fun onMessageReadReceipt(@NonNull internationalPhoneNumber: String, @NonNull messageIdList: List<String>)
Called when client received the read receipt for a DISPLAY message.
Link copied to clipboard
abstract fun onMessageReadReceived(@Nullable messageIdList: List<String>, @Nullable voipSessionIdList: List<String>)
Called when a display message has been read from your WebChat.
Link copied to clipboard
abstract fun onMessageSendingInProgress(@NonNull conversationId: String, @NonNull messageId: String)
Called when a message is being sent
Link copied to clipboard
abstract fun onMessageUpdated(@NonNull conversationId: String, @NonNull messageId: String)
Called when a message was updated by the filtering system in order to remove any malicious attachments and/or contents that contains virus.
Link copied to clipboard
abstract fun onNewAdministratorsAssigned(    @NonNull conversationId: String,     @NonNull assignedAdminMsisdnList: List<String>,     @NonNull administratorMsisdn: String)
Called when a list of phone number promoted as a regular admins by another administrator in a group conversation
Link copied to clipboard
abstract fun onNewMessageReceived(    @NonNull conversationId: String,     @NonNull message: BaseMessage,     @NonNull internationalNumber: String,     isNoNotification: Boolean)
Called when a message is received from backend whether for synchronization (from your WebChat) or received at runtime FYI : this callback is not called when a conversation or a message list request is received, this callback is only for messages at runtime
Link copied to clipboard
abstract fun onRemoveFromConversationCompleted(@NonNull conversationId: String)
Called when the client has successfully removed a recipient from a group conversation.
Link copied to clipboard
abstract fun onRemoveFromConversationFailed(@NonNull conversationId: String)
Called when an error occurred when the client (group conversation administrator) remove a recipient from conversation.
Link copied to clipboard
abstract fun onRemoveFromConversationReceived(    @NonNull conversationId: String,     @NonNull adminMsisdn: String,     @Nullable removedMsisdnList: List<String>,     @Nullable removedGroupId: List<String>)
Called when the backend notifies the client that a subscriber (whether a single user or a group) has been removed from a group conversation by the admin.
Link copied to clipboard
abstract fun onRemoveRegularAdminsCompleted(@NonNull conversationId: String, @NonNull msisds: List<String>)
Called when one or more msisdn are successfully promoted to be admins in the conversation
Link copied to clipboard
abstract fun onRemoveRegularAdminsFailed(@NonNull conversationId: String, @NonNull msisds: List<String>)
Called when one or more msisdn are failed to demoted as members in the conversation
Link copied to clipboard
abstract fun onVoiceMessagePlayedReceived(@NonNull messageIdList: List<String>)
Called when a voice message attachment has been played from your webChat.