public interface ChannelListener
You should create this listener and attach it to channel using Channel.addListener(com.twilio.chat.ChannelListener)
if you want to receive status updates on channel changes.
This listener's callbacks will be called on the originating thread if it has a Looper, otherwise on the main UI thread.
Modifier and Type | Method and Description |
---|---|
void |
onMemberAdded(Member member)
Called when a Member is added to the channel the current user is subscribed to.
|
void |
onMemberDeleted(Member member)
Called when a Member is deleted from the channel the current user is subscribed to.
|
void |
onMemberUpdated(Member member)
Called when a Member is changed in the channel the current user is subscribed to.
|
void |
onMessageAdded(Message message)
Called when a Message is added to the channel the current user is subscribed to.
|
void |
onMessageDeleted(Message message)
Called when a Message is deleted from the channel the current user is subscribed to.
|
void |
onMessageUpdated(Message message)
Called when a Message is changed in the channel the current user is subscribed to.
|
void |
onSynchronizationChanged(Channel channel)
Called when channel synchronization status changed.
|
void |
onTypingEnded(Member member)
Called when an Member stops typing in a Channel.
|
void |
onTypingStarted(Member member)
Called when an Member starts typing in a Channel.
|
void onMessageAdded(Message message)
You could obtain the Channel where it was added by
using Message.getChannel()
or Message.getChannelSid()
.
message
- The message that has been added.#onMessageChange
,
#onMessageDelete
void onMessageUpdated(Message message)
You could obtain the Channel where it was changed by
using Message.getChannel()
or Message.getChannelSid()
.
Message change events include body
updates
and attribute
updates.
message
- The message that changed.#onMessageAdd
,
#onMessageDelete
void onMessageDeleted(Message message)
You could obtain the Channel where it was deleted from by
using Message.getChannel()
or Message.getChannelSid()
.
message
- The message that got deleted.#onMessageAdd
,
#onMessageChange
void onMemberAdded(Member member)
You could obtain the Channel it was added to by using Member.getChannel()
.
member
- The member that joined.onMemberUpdated(com.twilio.chat.Member)
,
onMemberDeleted(com.twilio.chat.Member)
void onMemberUpdated(Member member)
You could obtain the Channel where it was changed by using Member.getChannel()
.
Member change events include consumption horizon
updates, reachability status
updates
and user profile
updates.
member
- The member that changed.onMemberAdded(com.twilio.chat.Member)
,
onMemberDeleted(com.twilio.chat.Member)
void onMemberDeleted(Member member)
You could obtain the Channel it was deleted from by using Member.getChannel()
.
member
- The member that was deleted.onMemberAdded(com.twilio.chat.Member)
,
onMemberUpdated(com.twilio.chat.Member)
void onTypingStarted(Member member)
You could obtain the Channel from the Member using Member.getChannel()
.
member
- The member that started typing.onTypingEnded(com.twilio.chat.Member)
void onTypingEnded(Member member)
You could obtain the Channel from the Member using Member.getChannel()
.
Typing indicator has a timeout after user stops typing to avoid triggering it too often. Expect about 5 seconds delay between stopping typing and receiving typing ended event.
member
- The member that stopped typing.onTypingStarted(com.twilio.chat.Member)
void onSynchronizationChanged(Channel channel)
channel
- Channel for which synchronization status has changed.Channel.SynchronizationStatus