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 |
onMemberChange(Member member)
Called when a Member is changed in the channel the current user is subscribed to.
|
void |
onMemberDelete(Member member)
Called when a Member is deleted from the channel the current user is subscribed to.
|
void |
onMemberJoin(Member member)
Called when a Member is added to the channel the current user is subscribed to.
|
void |
onMessageAdd(Message message)
Called when a Message is added to the channel the current user is subscribed to.
|
void |
onMessageChange(Message message)
Called when a Message is changed in the channel the current user is subscribed to.
|
void |
onMessageDelete(Message message)
Called when a Message is deleted from the channel the current user is subscribed to.
|
void |
onSynchronizationChange(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 onMessageAdd(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(com.twilio.chat.Message)
,
onMessageDelete(com.twilio.chat.Message)
void onMessageChange(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(com.twilio.chat.Message)
,
onMessageDelete(com.twilio.chat.Message)
void onMessageDelete(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(com.twilio.chat.Message)
,
onMessageChange(com.twilio.chat.Message)
void onMemberJoin(Member member)
You could obtain the Channel it was added to by using Member.getChannel()
.
member
- The member that joined.onMemberChange(com.twilio.chat.Member)
,
onMemberDelete(com.twilio.chat.Member)
void onMemberChange(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.onMemberJoin(com.twilio.chat.Member)
,
onMemberDelete(com.twilio.chat.Member)
void onMemberDelete(Member member)
You could obtain the Channel it was deleted from by using Member.getChannel()
.
member
- The member that was deleted.onMemberJoin(com.twilio.chat.Member)
,
onMemberChange(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 onSynchronizationChange(Channel channel)
channel
- Channel for which synchronization status has changed.Channel.SynchronizationStatus