Class TypingMessageManager

    • 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
      static TypingMessageManager getInstance()
      void init(Context context)
      boolean isShowMessageTyping()
      synchronized Collection<TypingStatus> getTypingUserListFromConversation(ConversationType conversationType, String targetId, String channelId) 根据 conversationType 和 targetId 获取当前会话正在输入的用户列表
      void sendTypingMessage(ConversationType conversationType, String targetId, String channelId, String typingContentType) 发送 TypingStatusMessage 为保证产品体验和网络优化,在当前用户的每个会话中,该消息发送之后, DISAPPEAR_INTERVAL时间间隔内不会再重复发送。
      void setTypingEnd(ConversationType conversationType, String targetId, String channelId) 输入状态终止
      void setTypingMessageStatusListener(IRongCoreListener.TypingStatusListener listener) 设置输入状态监听器。当输入状态发生变化时,会回调onTypingStatusChanged 对于单聊而言,当对方正在输入时,监听会触发一次;当对方不处于输入状态时,该监听还会触发一次,但是回调里上来的输入用户列表为空
      void setConversationChannelTypingStatusListener(IConversationChannelListener.ConversationChannelTypingStatusListener listener) 设置输入状态监听器。 当输入状态发生变化时,回调 onTypingStatusChanged (Conversation.
      boolean onReceiveMessage(Message message) 收到输入状态消息,显示正在输入 收到其它类型消息,取消正在输入的显示
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • init

         void init(Context context)
      • getTypingUserListFromConversation

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

        根据 conversationType 和 targetId 获取当前会话正在输入的用户列表

        Parameters:
        conversationType - 会话类型
        targetId - 会话 id
        channelId - 消息所属会话的业务标识
        Returns:

        当前会话正在输入的用户列表

      • sendTypingMessage

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

        发送 TypingStatusMessage 为保证产品体验和网络优化,在当前用户的每个会话中,该消息发送之后, DISAPPEAR_INTERVAL时间间隔内不会再重复发送。

        Parameters:
        conversationType - 会话类型
        targetId - 会话 id
        channelId - 消息所属会话的业务标识
        typingContentType - message 的 objectName
      • setTypingEnd

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

        输入状态终止

        Parameters:
        conversationType - 会话类型
        targetId - 会话 id
        channelId - 消息所属会话的业务标识
      • setTypingMessageStatusListener

         void setTypingMessageStatusListener(IRongCoreListener.TypingStatusListener listener)

        设置输入状态监听器。当输入状态发生变化时,会回调onTypingStatusChanged 对于单聊而言,当对方正在输入时,监听会触发一次;当对方不处于输入状态时,该监听还会触发一次,但是回调里上来的输入用户列表为空

        Parameters:
        listener - 输入状态监听器
      • onReceiveMessage

         boolean onReceiveMessage(Message message)

        收到输入状态消息,显示正在输入 收到其它类型消息,取消正在输入的显示

        Parameters:
        message - 收到的消息
        Returns:

        返回 true 表明是 TypingMessage,RongCoreClient 里不需要再做进一步处理 返回 false 表明是其它类型消息,RongCoreClient 里还需要下一步处理