/ SDKs / Unity
SDKs
Chat SDKs Unity v4
Chat SDKs Unity
Chat SDKs
Unity
Version 4

Send typing indicators to other members

Copy link

If the StartTyping() and EndTyping() methods are called while the current user is typing a message in a group channel, OnTypingStatusUpdated() in the channel event handler is invoked on all channel members' devices except the one that belongs to the user who is currently typing.

groupChannel.StartTyping();
groupChannel.EndTyping();

// To listen to an update from all the other channel members' client apps,
// implement onTypingStatusUpdated() with things to do when notified.
SbGroupChannelHandler channelHandler = new SbGroupChannelHandler
{
    OnTypingStatusUpdated = (inGroupChannel) =>
    {
        if (inGroupChannel.Url == currentChannel.Url)
        {
            // Refresh the typing status of channel members.    
        }
    }
};

SendbirdChat.GroupChannel.AddGroupChannelHandler(UNIQUE_HANDLER_ID, channelHandler);