public interface MessageCollectionHandler
MessageCollection
..
,
.
Modifier and Type | Method and Description |
---|---|
void |
onChannelDeleted(GroupChannelContext context,
java.lang.String channelUrl)
Called when the
GroupChannel this MessageCollection holds is deleted. |
void |
onChannelUpdated(GroupChannelContext context,
GroupChannel channel)
Called when there's a change in the
GroupChannel this MessageCollection holds. |
void |
onHugeGapDetected()
Called when the
MessageCollection has detected a huge gap between current message list. |
void |
onMessagesAdded(MessageContext context,
GroupChannel channel,
java.util.List<BaseMessage> messages)
Called when one or more
BaseMessage is added to this MessageCollection . |
void |
onMessagesDeleted(MessageContext context,
GroupChannel channel,
java.util.List<BaseMessage> messages)
Called when one or more
BaseMessage is deleted from this MessageCollection . |
void |
onMessagesUpdated(MessageContext context,
GroupChannel channel,
java.util.List<BaseMessage> messages)
Called when one or more
BaseMessage is update in this MessageCollection . |
void onMessagesAdded(MessageContext context, GroupChannel channel, java.util.List<BaseMessage> messages)
BaseMessage
is added to this MessageCollection
.context
- a MessageContext
of where this addition happened.channel
- a GroupChannel
this collection holds.messages
- list of BaseMessage
that have been added. All messages will have the same BaseMessage.getSendingStatus()
.BaseMessage.SendingStatus
void onMessagesUpdated(MessageContext context, GroupChannel channel, java.util.List<BaseMessage> messages)
BaseMessage
is update in this MessageCollection
.context
- a MessageContext
of where this update happened.channel
- a GroupChannel
this collection holds.messages
- list of BaseMessage
that have been updated. All messages will have the same BaseMessage.getSendingStatus()
.BaseMessage.SendingStatus
void onMessagesDeleted(MessageContext context, GroupChannel channel, java.util.List<BaseMessage> messages)
BaseMessage
is deleted from this MessageCollection
.context
- a MessageContext
of where this deletion happened.channel
- a GroupChannel
this collection holds.messages
- list of BaseMessage
that have been deleted. All messages will have the same BaseMessage.getSendingStatus()
.BaseMessage.SendingStatus
void onChannelUpdated(GroupChannelContext context, GroupChannel channel)
GroupChannel
this MessageCollection
holds.context
- a GroupChannelContext
of where the change in channel happened.channel
- a GroupChannel
this collection holds.void onChannelDeleted(GroupChannelContext context, java.lang.String channelUrl)
GroupChannel
this MessageCollection
holds is deleted.context
- a GroupChannelContext
of where the change in channel happened.channelUrl
- a channel URL of this channel which has been deleted.void onHugeGapDetected()
MessageCollection
has detected a huge gap between current message list.
This can happen SDK checks for missing messages, which occurs in two cases.
1. when a reconnection occurs (changed from disconnected state to connected state)
2. when the androidx.lifecycle.Lifecycle.Event#ON_RESUME
is called. Normally, switching between Activity
.
When this called, you should call MessageCollection.dispose()
to remove current collection and create a new collection. Copyright © 2021, Sendbird or its affiliates. All rights reserved.
Report a bug or request a feature
For further developer documentation, see Chat SDK Documentation. That documentation contains more detailed descriptions, conceptual overviews, definitions of terms, and code examples.