Created
March 20, 2018 12:38
-
-
Save berkus/46f6997b3015f64a79054728198f7b42 to your computer and use it in GitHub Desktop.
Twilio Chat SDK channel handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClientListener : ChatClientListener { | |
override fun onChannelSynchronizationChange(channel: Channel) { | |
// Join channel first to trigger synchronization | |
if (channel.status == Channel.SynchronizationStatus.ALL) { // Channel is fully synchronized | |
channel.members // not null | |
} | |
} | |
} | |
chatClient.setListener(ClientListener()) | |
chatClient.channels.join("MyChannel", successListener) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment