Interface ChannelClickListener

  • All Implemented Interfaces:

    
    public interface ChannelClickListener
    
                        

    Listener for user interaction events within a conversation (channel) screen.

    Register an implementation via setChannelClickListener.

    Each method returns true if the app handles the event, or false to fall back to the default SDK behavior.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean onUserPortraitClick(Context context, ChannelType conversationType, UserInfo user, String targetId) Called when a user's avatar is tapped.
      abstract boolean onUserPortraitLongClick(Context context, ChannelType conversationType, UserInfo user, String targetId) Called when a user's avatar is long-pressed.
      abstract boolean onMessageClick(Context context, View view, Message message) Called when a message bubble is tapped.
      abstract boolean onMessageLongClick(Context context, View view, Message message) Called when a message bubble is long-pressed.
      abstract boolean onMessageLinkClick(Context context, String link, Message message) Called when a hyperlink inside a message is tapped.
      abstract boolean onReadReceiptStateClick(Context context, Message message) Called when the read-receipt status indicator of a message is tapped.
      boolean onQuickReplyClick(Context context) Called when the quick-reply button is tapped.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onUserPortraitClick

         abstract boolean onUserPortraitClick(Context context, ChannelType conversationType, UserInfo user, String targetId)

        Called when a user's avatar is tapped.

        Parameters:
        context - context
        conversationType - channel type
        user - the tapped user's info
        targetId - channel ID
        Returns:

        true if the app handles this click; false to use the default behavior

      • onUserPortraitLongClick

         abstract boolean onUserPortraitLongClick(Context context, ChannelType conversationType, UserInfo user, String targetId)

        Called when a user's avatar is long-pressed.

        Parameters:
        context - context
        conversationType - channel type
        user - the long-pressed user's info
        targetId - channel ID
        Returns:

        true if the app handles this event; false to use the default behavior

      • onMessageClick

         abstract boolean onMessageClick(Context context, View view, Message message)

        Called when a message bubble is tapped.

        Parameters:
        context - context
        view - the View that received the tap
        message - the tapped message
        Returns:

        true if the app handles this click; false to use the default behavior

      • onMessageLongClick

         abstract boolean onMessageLongClick(Context context, View view, Message message)

        Called when a message bubble is long-pressed.

        Parameters:
        context - context
        view - the View that received the long-press
        message - the long-pressed message
        Returns:

        true if the app handles this event; false to use the default behavior

      • onMessageLinkClick

         abstract boolean onMessageLinkClick(Context context, String link, Message message)

        Called when a hyperlink inside a message is tapped.

        Parameters:
        context - context
        link - the tapped link URL
        message - the message that contains the link
        Returns:

        true if the app handles this click; false to use the default behavior

      • onReadReceiptStateClick

         abstract boolean onReadReceiptStateClick(Context context, Message message)

        Called when the read-receipt status indicator of a message is tapped.

        Parameters:
        context - context
        message - the message whose receipt status was tapped
        Returns:

        true if the app handles this click; false to use the default behavior

      • onQuickReplyClick

         boolean onQuickReplyClick(Context context)

        Called when the quick-reply button is tapped.

        Parameters:
        context - context
        Returns:

        true if the app handles this click; false to use the default behavior