Class TypingMessageManager

    • Constructor Detail

    • Method Detail

      • init

         void init(Context context)
      • getTypingUserListFromConversation

         synchronized Collection<TypingStatus> getTypingUserListFromConversation(ConversationType conversationType, String targetId, String channelId)

        Retrieves the list of users currently typing in the specified conversation based on conversationType and targetId.

        Parameters:
        conversationType - The type of the conversation.
        targetId - The ID of the conversation.
        channelId - The business identifier of the conversation to which the message belongs.
        Returns:

        The list of users currently typing in the specified conversation.

      • sendTypingMessage

         void sendTypingMessage(ConversationType conversationType, String targetId, String channelId, String typingContentType)

        Sends a TypingStatusMessage. To ensure product experience and network optimization, this message will not be sent repeatedly within the DISAPPEAR_INTERVAL time interval in the current user's conversation after the message is sent.

        Parameters:
        conversationType - The type of conversation.
        targetId - The ID of the conversation.
        channelId - The business identifier of the conversation to which the message belongs.
        typingContentType - The objectName of the message.
      • setTypingEnd

         void setTypingEnd(ConversationType conversationType, String targetId, String channelId)

        Input Status Termination

        Parameters:
        conversationType - Conversation type
        targetId - Conversation ID
        channelId - Business identifier of the conversation to which the message belongs
      • setTypingMessageStatusListener

         void setTypingMessageStatusListener(IRongCoreListener.TypingStatusListener listener)

        Sets the typing status listener. When the typing status changes, the callback onTypingStatusChanged will be triggered. For one-to-one chats, the listener will be triggered once when the other party is typing, and once again when the other party stops typing, but the list of typing users in the callback will be empty.

        Parameters:
        listener - The typing status listener
      • onReceiveMessage

         boolean onReceiveMessage(Message message, boolean isPersisted)

        Receives typing status message to display typing indication. Receives other types of messages to cancel the typing display.

        Parameters:
        message - The received message
        Returns:

        Returns true if the message is a TypingMessage, indicating that no further processing is required in RongCoreClient. Returns false if the message is of another type, indicating that further processing is needed in RongCoreClient.