类 EaseLiveMessageHelper


  • public class EaseLiveMessageHelper
    extends java.lang.Object
    • 方法详细资料

      • init

        public void init​(java.lang.String chatRoomId)
      • addLiveMessageListener

        public void addLiveMessageListener​(OnLiveMessageListener liveMessageListener)
      • removeLiveMessageListener

        public void removeLiveMessageListener​(OnLiveMessageListener liveMessageListener)
      • sendTxtMsg

        public void sendTxtMsg​(java.lang.String content,
                               OnSendLiveMessageCallBack callBack)
        Send a text message
        参数:
        content -
        callBack -
      • sendGiftMsg

        public void sendGiftMsg​(java.lang.String chatRoomId,
                                java.lang.String giftId,
                                int num,
                                OnSendLiveMessageCallBack callBack)
        send gift message
        参数:
        giftId -
        num -
        callBack -
      • sendGiftMsg

        public void sendGiftMsg​(java.lang.String chatRoomId,
                                java.util.Map<java.lang.String,​java.lang.String> params,
                                OnSendLiveMessageCallBack callBack)
        send gift message
        参数:
        params -
        callBack -
      • sendPraiseMsg

        public void sendPraiseMsg​(java.lang.String chatRoomId,
                                  int num,
                                  OnSendLiveMessageCallBack callBack)
        send praise message
        参数:
        num -
        callBack -
      • sendPraiseMsg

        public void sendPraiseMsg​(java.lang.String chatRoomId,
                                  java.util.Map<java.lang.String,​java.lang.String> params,
                                  OnSendLiveMessageCallBack callBack)
        send praise message
        参数:
        params -
        callBack -
      • sendBarrageMsg

        public void sendBarrageMsg​(java.lang.String chatRoomId,
                                   java.lang.String content,
                                   OnSendLiveMessageCallBack callBack)
        send barrage message
        参数:
        content -
        callBack -
      • sendBarrageMsg

        public void sendBarrageMsg​(java.lang.String chatRoomId,
                                   java.util.Map<java.lang.String,​java.lang.String> params,
                                   OnSendLiveMessageCallBack callBack)
        send barrage message
        参数:
        params -
        callBack -
      • sendCustomMsg

        public void sendCustomMsg​(java.lang.String chatRoomId,
                                  java.lang.String event,
                                  java.util.Map<java.lang.String,​java.lang.String> params,
                                  OnSendLiveMessageCallBack callBack)
        send custom message
        参数:
        event -
        params -
        callBack -
      • sendCustomMsg

        public void sendCustomMsg​(java.lang.String to,
                                  io.agora.chat.ChatMessage.ChatType chatType,
                                  java.lang.String event,
                                  java.util.Map<java.lang.String,​java.lang.String> params,
                                  OnSendLiveMessageCallBack callBack)
        send custom message
        参数:
        to -
        chatType -
        event -
        params -
        callBack -
      • getMsgGiftId

        public java.lang.String getMsgGiftId​(io.agora.chat.ChatMessage msg)
        get gift id from message
        参数:
        msg -
        返回:
      • getMsgGiftNum

        public int getMsgGiftNum​(io.agora.chat.ChatMessage msg)
        get the number of gift in message
        参数:
        msg -
        返回:
      • getMsgPraiseNum

        public int getMsgPraiseNum​(io.agora.chat.ChatMessage msg)
        get the number of praise in message
        参数:
        msg -
        返回:
      • getMsgBarrageTxt

        public java.lang.String getMsgBarrageTxt​(io.agora.chat.ChatMessage msg)
        get the content of barrage in message
        参数:
        msg -
        返回:
      • isGiftMsg

        public boolean isGiftMsg​(io.agora.chat.ChatMessage msg)
        whether is gift message
        参数:
        msg -
        返回:
      • isPraiseMsg

        public boolean isPraiseMsg​(io.agora.chat.ChatMessage msg)
        whether is praise message
        参数:
        msg -
        返回:
      • isBarrageMsg

        public boolean isBarrageMsg​(io.agora.chat.ChatMessage msg)
        whether is barrage message
        参数:
        msg -
        返回:
      • getCustomEvent

        public java.lang.String getCustomEvent​(io.agora.chat.ChatMessage message)
        get the event of custom message
        参数:
        message -
        返回:
      • getCustomMsgParams

        public java.util.Map<java.lang.String,​java.lang.String> getCustomMsgParams​(io.agora.chat.ChatMessage message)
        get the params of message
        参数:
        message -
        返回:
      • getCustomMsgType

        public EaseLiveMessageType getCustomMsgType​(java.lang.String event)
        get the type of custom message
        参数:
        event -
        返回: