human: 如何处理七牛云的低代码QChatRoomService

gpt: [低代码](https://developer.qiniu.com/lowcode) > API 文档 >
[互动直播](https://developer.qiniu.com/lowcode/api/12007/qlive-api) > [android
API文档](https://developer.qiniu.com/lowcode/api/12032/the-android-api-
documentation) > QChatRoomService

#  QChatRoomService

最近更新时间: 2023-02-02 15:47:15

interface com.qlive.chatservice.QChatRoomService

聊天室服务

Index

方法

  * addServiceListener
  * removeServiceListener
  * sendCustomC2CMsg
  * sendCustomGroupMsg
  * kickUser
  * muteUser
  * getBannedMembers
  * blockUser
  * getBlockList
  * addAdmin
  * removeAdmin

方法

addServiceListener

  * public void addServiceListener(QChatRoomServiceListener chatServiceListener)
  * 添加聊天室监听

Parameters

    * chatServiceListener: [QChatRoomServiceListener](https://developer.qiniu.com/lowcode/api/12103/QChatRoomServiceListener)

监听

Returns void

removeServiceListener

  * public void removeServiceListener(QChatRoomServiceListener chatServiceListener)
  * 移除聊天室监听

Parameters

    * chatServiceListener: [QChatRoomServiceListener](https://developer.qiniu.com/lowcode/api/12103/QChatRoomServiceListener)

监听

Returns void

sendCustomC2CMsg

  * public void sendCustomC2CMsg(boolean isCMD,String msg,String memberID,QLiveCallBack callBack)
  * 发c2c消息

Parameters

    * isCMD: boolean 

是不是信令消息

    * msg: String 

消息内容

    * memberID: String 

成员im ID

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

sendCustomGroupMsg

  * public void sendCustomGroupMsg(boolean isCMD,String msg,QLiveCallBack callBack)
  * 发群消息

Parameters

    * isCMD: boolean 

是不是信令消息

    * msg: String 

消息内容

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

kickUser

  * public void kickUser(String msg,String memberID,QLiveCallBack callBack)
  * 踢人

Parameters

    * msg: String 

消息内容

    * memberID: String 

成员im ID

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

muteUser

  * public void muteUser(boolean isMute,String msg,String memberID,long duration,QLiveCallBack callBack)
  * 禁言

Parameters

    * isMute: boolean 

是否禁言

    * msg: String 

消息内容

    * memberID: String 

成员im ID

    * duration: long 

禁言时常

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

getBannedMembers

  * public void getBannedMembers()
  * 禁言列表

Returns void

blockUser

  * public void blockUser(boolean isBlock,String memberID,QLiveCallBack callBack)
  * 拉黑

Parameters

    * isBlock: boolean 

是否拉黑

    * memberID: String 

成员im ID

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

getBlockList

  * public void getBlockList(boolean forceRefresh,QLiveCallBack callBack)
  * 黑名单列表

Parameters

    * forceRefresh: boolean 

是否强制拉服务端数据否则缓存

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

Returns void

addAdmin

  * public void addAdmin(String memberID,QLiveCallBack callBack)
  * 添加管理员

Parameters

    * memberID: String 

成员im ID

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

removeAdmin

  * public void removeAdmin(String msg,String memberID,QLiveCallBack callBack)
  * 移除管理员

Parameters

    * msg: String 

    * memberID: String 

成员im ID

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

回调

Returns void

以上内容是否对您有帮助？