Package 

Class SendBird.ChannelHandler


  • 
    public abstract class SendBird.ChannelHandler
    
                        

    Channel handler. This handler provides callbacks for events related OpenChannel or GroupChannel.All callbacks are called only when the currently logged-in User is a participant or member of OpenChannel or GroupChannel respectively.To add or remove this handler, refer to addChannelHandler and removeChannelHandler.

    • Method Detail

      • onMessageReceived

         abstract void onMessageReceived(BaseChannel channel, BaseMessage message)

        A callback for when a message is received.

        Parameters:
        channel - The channel message has come from.
        message - The message received.
      • onMentionReceived

         void onMentionReceived(BaseChannel channel, BaseMessage message)

        A callback for when a mention is received.

        Parameters:
        channel - The channel message has come from.
        message - The message received.
      • onMessageDeleted

         void onMessageDeleted(BaseChannel channel, long msgId)

        A callback for when a message is deleted.

        Parameters:
        channel - The channel the deleted message belongs to.
        msgId - The ID of the deleted message.
      • onMessageUpdated

         void onMessageUpdated(BaseChannel channel, BaseMessage message)

        A callback for when a message is updated.

        Parameters:
        channel - The channel the updated message belongs to.
        message - The updated message.
      • onChannelChanged

         void onChannelChanged(BaseChannel channel)

        A callback for when channel property is changed.

        Parameters:
        channel - The channel the property is changed of.
      • onReactionUpdated

         void onReactionUpdated(BaseChannel channel, ReactionEvent reactionEvent)

        A callback for when a reactionEvent is updated.

        Parameters:
        channel - The channel the updated message belongs to.
        reactionEvent - The updated reactionEvent.
      • onDeliveryReceiptUpdated

         void onDeliveryReceiptUpdated(GroupChannel channel)

        A callback for when delivered receipts are updated on GroupChannel.To use the updated delivered receipt, refer togetDeliveryReceipt

        Parameters:
        channel - The GroupChannel where the read receipt is updated.
      • onUserJoined

         void onUserJoined(GroupChannel channel, User user)

        A callback for when a new member has joined GroupChannel.To use the updated member list, refer to getMembers and getMemberCount.

        Parameters:
        channel - The GroupChannel the new member has joined.
        user - The newly joined member (User).
      • onUserDeclinedInvitation

         void onUserDeclinedInvitation(GroupChannel channel, User inviter, User invitee)

        A callback for when the newly invited member has declined the invitation for the GroupChannel.

        Parameters:
        channel - The GroupChannel the invitee has declined to join.
        inviter - The member who invited the invitee.
        invitee - Invitee who declined the invitation.
      • onUserLeft

         void onUserLeft(GroupChannel channel, User user)

        A callback for when an existing member has left GroupChannel.To use the updated member list and count, refer to getMembers and getMemberCount.

        Parameters:
        channel - The GroupChannel the member has left from.
        user - The left member (User).
      • onUserEntered

         void onUserEntered(OpenChannel channel, User user)

        A callback for when a User has entered OpenChannel.To use the updated participant count, refer to getParticipantCount.

        Parameters:
        channel - The OpenChannel the User has entered.
        user - The new participant (User).
      • onUserExited

         void onUserExited(OpenChannel channel, User user)

        A callback for when a User has exited OpenChannel.To use the updated participant count, refer to getParticipantCount.

        Parameters:
        channel - The OpenChannel the User has exited.
        user - The ex-participant (User).
      • onUserMuted

         void onUserMuted(BaseChannel channel, User user)

        A callback for when a User is muted from channel.

        Parameters:
        channel - The channel the User is muted from.
        user - The muted User.
      • onUserUnmuted

         void onUserUnmuted(BaseChannel channel, User user)

        A callback for when User is unmuted from channel.

        Parameters:
        channel - The channel the User is unmuted from.
        user - The unmuted User.
      • onUserBanned

         void onUserBanned(BaseChannel channel, User user)

        A callback for when user is banned from channel.

        Parameters:
        channel - The channel the User is banned from.
        user - The banned User.
      • onUserUnbanned

         void onUserUnbanned(BaseChannel channel, User user)

        A callback for when user is unbanned from channel.

        Parameters:
        channel - The channel the User is unbanned from.
        user - The banned User.
      • onChannelFrozen

         void onChannelFrozen(BaseChannel channel)

        A callback for when channel is frozen (Users can't send messages).

        Parameters:
        channel - The frozen channel.
      • onChannelUnfrozen

         void onChannelUnfrozen(BaseChannel channel)

        A callback for when channel is unfrozen (Users can send messages).

        Parameters:
        channel - The unfrozen channel.
      • onMetaDataCreated

         void onMetaDataCreated(BaseChannel channel, Map<String, String> metaDataMap)

        A callback for when channel meta data is created.

        Parameters:
        channel - The channel the meta data is created of.
        metaDataMap - The created meta data key-value map.
      • onMetaDataUpdated

         void onMetaDataUpdated(BaseChannel channel, Map<String, String> metaDataMap)

        A callback for when channel meta data is updated.

        Parameters:
        channel - The channel the meta data is updated of.
        metaDataMap - The updated meta data key-value map.
      • onMetaDataDeleted

         void onMetaDataDeleted(BaseChannel channel, List<String> keys)

        A callback for when channel meta data is deleted.

        Parameters:
        channel - The channel the meta data is deleted of.
        keys - The deleted meta data keys.
      • onMetaCountersCreated

         void onMetaCountersCreated(BaseChannel channel, Map<String, Integer> metaCounterMap)

        A callback for when channel meta counters is created.

        Parameters:
        channel - The channel the meta counters are created of.
        metaCounterMap - The created meta counters key-value map.
      • onMetaCountersUpdated

         void onMetaCountersUpdated(BaseChannel channel, Map<String, Integer> metaCounterMap)

        A callback for when channel meta counters is updated.

        Parameters:
        channel - The channel the meta counters are updated of.
        metaCounterMap - The updated meta counters key-value map.
      • onMetaCountersDeleted

         void onMetaCountersDeleted(BaseChannel channel, List<String> keys)

        A callback for when channel meta counters are deleted.

        Parameters:
        channel - The channel the meta counters are deleted of.
        keys - The deleted meta counters keys.
      • onChannelHidden

         void onChannelHidden(GroupChannel channel)

        A callback for when GroupChannel is hidden.

        Parameters:
        channel - The hidden GroupChannel.
      • onOperatorUpdated

         void onOperatorUpdated(BaseChannel channel)

        A callback for when operators change in channel

        Parameters:
        channel - The BaseChannel the change has occurred.
      • onThreadInfoUpdated

         void onThreadInfoUpdated(BaseChannel channel, ThreadInfoUpdateEvent threadInfoUpdateEvent)

        A callback for when the thread information is updated.

        Parameters:
        channel - The channel message has come from.
        threadInfoUpdateEvent - The updated thread info event.
      • onChannelMemberCountChanged

         void onChannelMemberCountChanged(List<GroupChannel> groupChannels)

        Called when one or more broadcast channel's member counts are changed.

        Parameters:
        groupChannels - channels which had a change in the member count.
      • onChannelParticipantCountChanged

         void onChannelParticipantCountChanged(List<OpenChannel> openChannels)

        Called when one or more open channel's member counts are changed.

        Parameters:
        openChannels - channels which had a change in the member count.