im::floo::floolib::BMXGroupManager

群组管理器

Public Functions

Name
BMXGroupManager(BMXGroupService service)
void getGroupList(final boolean forceRefresh, final BMXDataCallBack< BMXGroupList > callBack)
获取群组列表,如果设置了forceRefresh则从服务器拉取
void getGroupList(final ListOfLongLong groupIdList, final boolean forceRefresh, final BMXDataCallBack< BMXGroupList > callBack)
获取传入群组id的群组信息列表,如果设置了forceRefresh则从服务器拉取
void getGroupList(final long groupId, final boolean forceUpdate, final BMXDataCallBack< BMXGroup > callBack)
获取群信息,如果设置了forceRefresh则从服务器拉取
void getInvitationList(final String cursor, final int pageSize, final BMXDataCallBack< GroupInvitaionPage > callBack)
分页获取群组邀请列表
void getApplicationList(final BMXGroupList list, final String cursor, final int pageSize, final BMXDataCallBack< GroupApplicationPage > callBack)
分页获取群组申请列表
void create(final BMXGroupService.CreateGroupOptions options, final BMXDataCallBack< BMXGroup > callBack)
创建群
void destroy(final BMXGroup group, final BMXCallBack callBack)
销毁群
void join(final BMXGroup group, final String message, final BMXCallBack callBack)
加入一个群,根据群设置可能需要管理员批准
void leave(final BMXGroup group, final BMXCallBack callBack)
退出群
void getInfo(final BMXGroup group, final BMXDataCallBack< BMXGroup > callBack)
获取群详情,从服务端拉取最新信息
void getMembers(final BMXGroup group, final String cursor, final int pageSize, final BMXDataCallBack< BMXGroupMemberResultPage > callBack)
获取群成员列表,如果设置了forceRefresh则从服务器拉取,最多拉取1000人
void getMembers(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroupMemberList > callBack)
获取群成员列表,如果设置了forceRefresh则从服务器拉取,最多拉取1000人
void addMembers(final BMXGroup group, final ListOfLongLong members, final String message, final BMXCallBack callBack)
添加群成员
void removeMembers(final BMXGroup group, final ListOfLongLong members, final String reason, final BMXCallBack callBack)
删除群成员
void addAdmins(final BMXGroup group, final ListOfLongLong admins, final String message, final BMXCallBack callBack)
添加管理员
void removeAdmins(final BMXGroup group, final ListOfLongLong admins, final String reason, final BMXCallBack callBack)
删除管理员
void getAdmins(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroupMemberList > callBack)
获取Admins列表,如果设置了forceRefresh则从服务器拉取
void blockMembers(final BMXGroup group, final ListOfLongLong members, final BMXCallBack callBack)
添加黑名单
void unblockMembers(final BMXGroup group, final ListOfLongLong members, final BMXCallBack callBack)
从黑名单删除
void getBlockList(final BMXGroup group, final String cursor, final int pageSize, final BMXDataCallBack< BMXGroupMemberResultPage > callBack)
获取黑名单
void getBlockList(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroupMemberList > callBack)
获取黑名单
void banMembers(final BMXGroup group, final ListOfLongLong members, final long duration, final String reason, final BMXCallBack callBack)
禁言
void banGroup(final BMXGroup group, final long duration, final BMXCallBack callBack)
全员禁言
void unbanMembers(final BMXGroup group, final ListOfLongLong members, final BMXCallBack callBack)
解除禁言
void unbanGroup(final BMXGroup group, final BMXCallBack callBack)
解除全员禁言
void getBannedMembers(final BMXGroup group, final String cursor, final int pageSize, final BMXDataCallBack< BMXGroupBannedMemberResultPage > callBack)
获取禁言列表
void getBannedMembers(final BMXGroup group, final BMXDataCallBack< BMXGroupBannedMemberList > callBack)
获取禁言列表
void muteMessage(final BMXGroup group, final BMXGroup.MsgMuteMode mode, final BMXCallBack callBack)
设置是否屏蔽群消息
void acceptApplication(final BMXGroup group, final long applicantId, final BMXCallBack callBack)
接受入群申请
void declineApplication(final BMXGroup group, final long applicantId, final String reason, final BMXCallBack callBack)
拒绝入群申请
void acceptInvitation(final BMXGroup group, final long inviter, final BMXCallBack callBack)
接受入群邀请
void declineInvitation(final BMXGroup group, final long inviter, final BMXCallBack callBack)
拒绝入群邀请
void transferOwner(final BMXGroup group, final long newOwnerId, final BMXCallBack callBack)
转移群主
void uploadSharedFile(final BMXGroup group, final String filePath, final String displayName, final String extensionName, final FileProgressListener listener, final BMXCallBack callBack)
添加群共享文件
void removeSharedFile(final BMXGroup group, final BMXGroup.SharedFile sharedFile, final BMXCallBack callBack)
移除群共享文件
void downloadSharedFile(final BMXGroup group, final BMXGroup.SharedFile sharedFile, final FileProgressListener listener, final BMXCallBack callBack)
下载群共享文件
void getSharedFilesList(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroupSharedFileList > callBack)
获取群共享文件列表
void changeSharedFileName(final BMXGroup group, final BMXGroup.SharedFile sharedFile, final String name, final BMXCallBack callBack)
修改群共享文件名称
void getLatestAnnouncement(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroup.Announcement > callBack)
获取最新的群公告
void getAnnouncementList(final BMXGroup group, final boolean forceRefresh, final BMXDataCallBack< BMXGroupAnnouncementList > callBack)
获取群公告列表
void editAnnouncement(final BMXGroup group, final String title, final String content, final BMXCallBack callBack)
设置群公告
void deleteAnnouncement(final BMXGroup group, final long announcementId, final BMXCallBack callBack)
删除群公告
void setName(final BMXGroup group, final String name, final BMXCallBack callBack)
设置群名称
void setDescription(final BMXGroup group, final String description, final BMXCallBack callBack)
设置群描述信息
void setExtension(final BMXGroup group, final String extension, final BMXCallBack callBack)
设置群扩展信息
void setMyNickname(final BMXGroup group, final String nickname, final BMXCallBack callBack)
设置在群里的昵称
void setMsgPushMode(final BMXGroup group, final BMXGroup.MsgPushMode mode, final BMXCallBack callBack)
设置群消息通知模式
void setJoinAuthMode(final BMXGroup group, final BMXGroup.JoinAuthMode mode, final BMXCallBack callBack)
设置入群审批模式
void setInviteMode(final BMXGroup group, final BMXGroup.InviteMode mode, final BMXCallBack callBack)
设置邀请模式
void setAvatar(final BMXGroup group, final String avatarPath, final FileProgressListener listener, final BMXCallBack callBack)
设置群头像
void downloadAvatar(final BMXGroup group, final FileProgressListener listener, final BMXCallBack callBack)
下载群头像
void addGroupListener(BMXGroupServiceListener listener)
添加群组变化监听者
void removeGroupListener(BMXGroupServiceListener listener)
移除群组变化监听者
void setEnableReadAck(final BMXGroup group, final boolean enable, final BMXCallBack callBack)
设置是否开启群消息已读功能

Public Functions Documentation

function BMXGroupManager

inline BMXGroupManager(
    BMXGroupService service
)

Example:

function getGroupList

inline void getGroupList(
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupList > callBack
)

获取群组列表,如果设置了forceRefresh则从服务器拉取

Parameters:

  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],群组id列表

Example:

public void getGroupList(boolean forceRefresh, BMXDataCallBack<BMXGroupList> callBack) {
    mService.getGroupList(forceRefresh, callBack);

function getGroupList

inline void getGroupList(
    final ListOfLongLong groupIdList,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupList > callBack
)

获取传入群组id的群组信息列表,如果设置了forceRefresh则从服务器拉取

Parameters:

  • groupIdList 群组id列表
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],群组详细信息列表

Example:

public void getGroupList(boolean forceRefresh, BMXDataCallBack<BMXGroupList> callBack) {
    mService.getGroupList(forceRefresh, callBack);

function getGroupList

inline void getGroupList(
    final long groupId,
    final boolean forceUpdate,
    final BMXDataCallBack< BMXGroup > callBack
)

获取群信息,如果设置了forceRefresh则从服务器拉取

Parameters:

  • groupId 要搜索的群组id
  • forceUpdate 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],搜索返回的群组信息

Example:

public void getGroupList(boolean forceRefresh, BMXDataCallBack<BMXGroupList> callBack) {
    mService.getGroupList(forceRefresh, callBack);

function getInvitationList

inline void getInvitationList(
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< GroupInvitaionPage > callBack
)

分页获取群组邀请列表

Parameters:

  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小
  • callBack [BMXErrorCode],分页获取的群组邀请列表

Example:

public void getInvitationList(String cursor, int pageSize, BMXDataCallBack<GroupInvitaionPage> callBack) {
    mService.getInvitationList(cursor, pageSize, callBack);

function getApplicationList

inline void getApplicationList(
    final BMXGroupList list,
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< GroupApplicationPage > callBack
)

分页获取群组申请列表

Parameters:

  • list 需要获取群组申请列表信息的群组id列表
  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小
  • callBack [BMXErrorCode],分页获取的群组申请列表

Example:

function create

inline void create(
    final BMXGroupService.CreateGroupOptions options,
    final BMXDataCallBack< BMXGroup > callBack
)

创建群

Parameters:

  • options 创建群组时传入的参数选项
  • callBack [BMXErrorCode],创建好的群

Example:

function destroy

inline void destroy(
    final BMXGroup group,
    final BMXCallBack callBack
)

销毁群

Parameters:

  • callBack BMXErrorCode,要销毁的群组

Example:

public void destroy(BMXGroup group, BMXCallBack callBack) {
    mService.destroy(group, callBack);

function join

inline void join(
    final BMXGroup group,
    final String message,
    final BMXCallBack callBack
)

加入一个群,根据群设置可能需要管理员批准

Parameters:

  • group 要加入的群组
  • message 申请入群的信息
  • callBack [BMXErrorCode]

Example:

public void join(BMXGroup group, String message, BMXCallBack callBack) {
    mService.join(group, message, callBack);

function leave

inline void leave(
    final BMXGroup group,
    final BMXCallBack callBack
)

退出群

Parameters:

  • group 要退出的群组
  • callBack [BMXErrorCode]

Example:

public void leave(BMXGroup group, BMXCallBack callBack) {
    mService.leave(group, callBack);

function getInfo

inline void getInfo(
    final BMXGroup group,
    final BMXDataCallBack< BMXGroup > callBack
)

获取群详情,从服务端拉取最新信息

Parameters:

  • callBack [BMXErrorCode],要获取群组最新信息的群组

Example:

public void getInfo(BMXGroup group, BMXDataCallBack<BMXGroup> callBack) {
    mService.getInfo(group, callBack);

function getMembers

inline void getMembers(
    final BMXGroup group,
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< BMXGroupMemberResultPage > callBack
)

获取群成员列表,如果设置了forceRefresh则从服务器拉取,最多拉取1000人

Parameters:

  • group 进行操作的群组
  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小
  • callBack [BMXErrorCode],群成员列表

Example:

public void getMembers(BMXGroup group, boolean forceRefresh, BMXDataCallBack<BMXGroupMemberList> callBack) {
    mService.getMembers(group, forceRefresh, callBack);

function getMembers

inline void getMembers(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupMemberList > callBack
)

获取群成员列表,如果设置了forceRefresh则从服务器拉取,最多拉取1000人

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],群成员列表

Example:

public void getMembers(BMXGroup group, boolean forceRefresh, BMXDataCallBack<BMXGroupMemberList> callBack) {
    mService.getMembers(group, forceRefresh, callBack);

function addMembers

inline void addMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final String message,
    final BMXCallBack callBack
)

添加群成员

Parameters:

  • group 进行操作的群组
  • members 要添加进群的成员id列表
  • message 添加成员原因信息
  • callBack [BMXErrorCode]

Example:

public void addMembers(BMXGroup group, ListOfLongLong listOfLongLong, String message, BMXCallBack callBack) {
    mService.addMembers(group, listOfLongLong, message, callBack);

function removeMembers

inline void removeMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final String reason,
    final BMXCallBack callBack
)

删除群成员

Parameters:

  • group 进行操作的群组
  • members 要删除的群组成员id列表
  • reason 删除的原因
  • callBack [BMXErrorCode]

Example:

public void removeMembers(BMXGroup group, ListOfLongLong listOfLongLong, String reason,
        BMXCallBack callBack) {
    mService.removeMembers(group, listOfLongLong, reason, callBack);

function addAdmins

inline void addAdmins(
    final BMXGroup group,
    final ListOfLongLong admins,
    final String message,
    final BMXCallBack callBack
)

添加管理员

Parameters:

  • group 进行操作的群组
  • admins 要添加为管理员的成员id列表
  • message 添加为管理员的原因
  • callBack [BMXErrorCode]

Example:

public void addAdmins(BMXGroup group, ListOfLongLong listOfLongLong, String message,
        BMXCallBack callBack) {
    mService.addAdmins(group, listOfLongLong, message, callBack);

function removeAdmins

inline void removeAdmins(
    final BMXGroup group,
    final ListOfLongLong admins,
    final String reason,
    final BMXCallBack callBack
)

删除管理员

Parameters:

  • group 进行操作的群组
  • admins 要从管理员移除的成员id列表
  • reason 要移除管理员的原因
  • callBack [BMXErrorCode]

Example:

public void removeAdmins(BMXGroup group, ListOfLongLong listOfLongLong, String reason,
        BMXCallBack callBack) {
    mService.removeAdmins(group, listOfLongLong, reason, callBack);

function getAdmins

inline void getAdmins(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupMemberList > callBack
)

获取Admins列表,如果设置了forceRefresh则从服务器拉取

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],群管理员列表

Example:

public void getAdmins(BMXGroup group, boolean forceRefresh, BMXDataCallBack<BMXGroupMemberList> callBack) {
    mService.getAdmins(group, forceRefresh, callBack);

function blockMembers

inline void blockMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final BMXCallBack callBack
)

添加黑名单

Parameters:

  • group 进行操作的群组
  • members 要加入黑名单的群成员id列表
  • callBack [BMXErrorCode]

Example:

public void blockMembers(BMXGroup group, ListOfLongLong listOfLongLong, BMXCallBack callBack) {
    mService.blockMembers(group, listOfLongLong, callBack);

function unblockMembers

inline void unblockMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final BMXCallBack callBack
)

从黑名单删除

Parameters:

  • group 进行操作的群组
  • members 从黑名单移除的用户id列表
  • callBack [BMXErrorCode]

Example:

public void unblockMembers(BMXGroup group, ListOfLongLong listOfLongLong, BMXCallBack callBack) {
    mService.unblockMembers(group, listOfLongLong, callBack);

function getBlockList

inline void getBlockList(
    final BMXGroup group,
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< BMXGroupMemberResultPage > callBack
)

获取黑名单

Parameters:

  • group 进行操作的群组
  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小
  • callBack [BMXErrorCode],群黑名单列表

Example:

function getBlockList

inline void getBlockList(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupMemberList > callBack
)

获取黑名单

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode],群黑名单列表

Example:

function banMembers

inline void banMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final long duration,
    final String reason,
    final BMXCallBack callBack
)

禁言

Parameters:

  • group 进行操作的群组
  • members 被禁言的群成员id列表
  • duration 禁言时长
  • reason 禁言原因
  • callBack [BMXErrorCode]

Example:

public void banMembers(BMXGroup group, ListOfLongLong listOfLongLong, long duration,
        String reason, BMXCallBack callBack) {
    mService.banMembers(group, listOfLongLong, duration, reason, callBack);

function banGroup

inline void banGroup(
    final BMXGroup group,
    final long duration,
    final BMXCallBack callBack
)

全员禁言

Parameters:

  • group 进行操作的群组
  • duration 禁言时长
  • callBack [BMXErrorCode]

Example:

public void banGroup(BMXGroup group, long duration, BMXCallBack callBack) {
    mService.banGroup(group, duration, callBack);

function unbanMembers

inline void unbanMembers(
    final BMXGroup group,
    final ListOfLongLong members,
    final BMXCallBack callBack
)

解除禁言

Parameters:

  • group 进行操作的群组
  • members 被解除禁言的群成员id列表
  • callBack [BMXErrorCode]

Example:

public void unbanMembers(BMXGroup group, ListOfLongLong listOfLongLong, BMXCallBack callBack) {
    mService.unbanMembers(group, listOfLongLong, callBack);

function unbanGroup

inline void unbanGroup(
    final BMXGroup group,
    final BMXCallBack callBack
)

解除全员禁言

Parameters:

  • group 进行操作的群组
  • callBack [BMXErrorCode]

Example:

public void unbanGroup(BMXGroup group, BMXCallBack callBack) {
    mService.unbanGroup(group, callBack);

function getBannedMembers

inline void getBannedMembers(
    final BMXGroup group,
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< BMXGroupBannedMemberResultPage > callBack
)

获取禁言列表

Parameters:

  • group 进行操作的群组
  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小
  • callBack [BMXErrorCode] 群禁言列表

Example:

public void getBannedMembers(BMXGroup group, BMXDataCallBack<BMXGroupBannedMemberList> callBack) {
    mService.getBannedMembers(group, callBack);
public void getBannedMembers(BMXGroup group, String cursor, int pageSize, BMXDataCallBack<BMXGroupBannedMemberResultPage> callBack) {
    mService.getBannedMembers(group, cursor, pageSize, callBack);

function getBannedMembers

inline void getBannedMembers(
    final BMXGroup group,
    final BMXDataCallBack< BMXGroupBannedMemberList > callBack
)

获取禁言列表

Parameters:

  • group 进行操作的群组
  • callBack [BMXErrorCode] 群禁言列表

Example:

public void getBannedMembers(BMXGroup group, BMXDataCallBack<BMXGroupBannedMemberList> callBack) {
    mService.getBannedMembers(group, callBack);
public void getBannedMembers(BMXGroup group, String cursor, int pageSize, BMXDataCallBack<BMXGroupBannedMemberResultPage> callBack) {
    mService.getBannedMembers(group, cursor, pageSize, callBack);

function muteMessage

inline void muteMessage(
    final BMXGroup group,
    final BMXGroup.MsgMuteMode mode,
    final BMXCallBack callBack
)

设置是否屏蔽群消息

Parameters:

  • group 进行操作的群组
  • mode 群屏蔽的模式
  • callBack [BMXErrorCode]

Example:

public void muteMessage(BMXGroup group, BMXGroup.MsgMuteMode mode, BMXCallBack callBack) {
    mService.muteMessage(group, mode, callBack);

function acceptApplication

inline void acceptApplication(
    final BMXGroup group,
    final long applicantId,
    final BMXCallBack callBack
)

接受入群申请

Parameters:

  • group 进行操作的群组
  • applicantId 申请进群的用户id
  • callBack [BMXErrorCode]

Example:

public void acceptApplication(BMXGroup group, long applicantId, BMXCallBack callBack) {
    mService.acceptApplication(group, applicantId, callBack);

function declineApplication

inline void declineApplication(
    final BMXGroup group,
    final long applicantId,
    final String reason,
    final BMXCallBack callBack
)

拒绝入群申请

Parameters:

  • group 进行操作的群组
  • applicantId 申请进群的用户id
  • reason 拒绝的原因
  • callBack [BMXErrorCode]

Example:

public void declineApplication(BMXGroup group, long applicantId, String reason, BMXCallBack callBack) {
    mService.declineApplication(group, applicantId, reason, callBack);

function acceptInvitation

inline void acceptInvitation(
    final BMXGroup group,
    final long inviter,
    final BMXCallBack callBack
)

接受入群邀请

Parameters:

  • group 进行操作的群组
  • inviter 邀请者id
  • callBack [BMXErrorCode]

Example:

public void acceptInvitation(BMXGroup group, long inviter, BMXCallBack callBack) {
    mService.acceptInvitation(group, inviter, callBack);

function declineInvitation

inline void declineInvitation(
    final BMXGroup group,
    final long inviter,
    final BMXCallBack callBack
)

拒绝入群邀请

Parameters:

  • group 进行操作的群组
  • inviter 邀请者id
  • callBack [BMXErrorCode]

Example:

public void declineInvitation(BMXGroup group, long inviter, BMXCallBack callBack) {
    mService.declineInvitation(group, inviter, callBack);

function transferOwner

inline void transferOwner(
    final BMXGroup group,
    final long newOwnerId,
    final BMXCallBack callBack
)

转移群主

Parameters:

  • group 进行操作的群组
  • newOwnerId 转让为新群主的用户id
  • callBack [BMXErrorCode]

Example:

public void transferOwner(BMXGroup group, long newOwnerId, BMXCallBack callBack) {
    mService.transferOwner(group, newOwnerId, callBack);

function uploadSharedFile

inline void uploadSharedFile(
    final BMXGroup group,
    final String filePath,
    final String displayName,
    final String extensionName,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

添加群共享文件

Parameters:

  • group 进行操作的群组
  • filePath 文件的本地路径
  • displayName 文件的展示名
  • extensionName 文件的扩展名
  • listener 上传回调函数
  • callBack [BMXErrorCode]

Example:

public void uploadSharedFile(BMXGroup group, String filePath, String displayName,
        String extensionName, FileProgressListener listener, BMXCallBack callBack) {
    mService.uploadSharedFile(group, filePath, displayName, extensionName, listener, callBack);

function removeSharedFile

inline void removeSharedFile(
    final BMXGroup group,
    final BMXGroup.SharedFile sharedFile,
    final BMXCallBack callBack
)

移除群共享文件

Parameters:

  • group 进行操作的群组
  • sharedFile 删除的群共享文件
  • callBack [BMXErrorCode]

Example:

public void removeSharedFile(BMXGroup group, BMXGroup.SharedFile sharedFile, BMXCallBack callBack) {
    mService.removeSharedFile(group, sharedFile, callBack);

function downloadSharedFile

inline void downloadSharedFile(
    final BMXGroup group,
    final BMXGroup.SharedFile sharedFile,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

下载群共享文件

Parameters:

  • group 进行操作的群组
  • sharedFile 下载的群共享文件
  • listener 下载回调函数
  • callBack [BMXErrorCode]

Example:

public void downloadSharedFile(BMXGroup group, BMXGroup.SharedFile sharedFile,
        FileProgressListener listener, BMXCallBack callBack) {
    mService.downloadSharedFile(group, sharedFile, listener, callBack);

function getSharedFilesList

inline void getSharedFilesList(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupSharedFileList > callBack
)

获取群共享文件列表

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode] 群共享文件列表

Example:

public void getSharedFilesList(BMXGroup group, boolean forceRefresh,
        BMXDataCallBack<BMXGroupSharedFileList> callBack) {
    mService.getSharedFilesList(group, forceRefresh, callBack);

function changeSharedFileName

inline void changeSharedFileName(
    final BMXGroup group,
    final BMXGroup.SharedFile sharedFile,
    final String name,
    final BMXCallBack callBack
)

修改群共享文件名称

Parameters:

  • group 进行操作的群组
  • sharedFile 进行更改的群共享文件
  • name 修改的群共享文件名称
  • callBack [BMXErrorCode]

Example:

public void changeSharedFileName(BMXGroup group, BMXGroup.SharedFile sharedFile, String name,
        BMXCallBack callBack) {
    mService.changeSharedFileName(group, sharedFile, name, callBack);

function getLatestAnnouncement

inline void getLatestAnnouncement(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroup.Announcement > callBack
)

获取最新的群公告

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode] 最新的群组公告

Example:

public void getLatestAnnouncement(BMXGroup group, boolean forceRefresh,
        BMXDataCallBack<BMXGroup.Announcement> callBack) {
    mService.getLatestAnnouncement(group, forceRefresh, callBack);

function getAnnouncementList

inline void getAnnouncementList(
    final BMXGroup group,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXGroupAnnouncementList > callBack
)

获取群公告列表

Parameters:

  • group 进行操作的群组
  • forceRefresh 设置为true强制从服务器获取,本地获取失败的情况sdk会自动从服务器获取
  • callBack [BMXErrorCode], 群公告列表

Example:

public void getAnnouncementList(BMXGroup group, boolean forceRefresh,
        BMXDataCallBack<BMXGroupAnnouncementList> callBack) {
    mService.getAnnouncementList(group, forceRefresh, callBack);

function editAnnouncement

inline void editAnnouncement(
    final BMXGroup group,
    final String title,
    final String content,
    final BMXCallBack callBack
)

设置群公告

Parameters:

  • group 进行操作的群组
  • title 群公告的标题
  • content 群公告的内容
  • callBack [BMXErrorCode]

Example:

public void editAnnouncement(BMXGroup group, String title, String content, BMXCallBack callBack) {
    mService.editAnnouncement(group, title, content, callBack);

function deleteAnnouncement

inline void deleteAnnouncement(
    final BMXGroup group,
    final long announcementId,
    final BMXCallBack callBack
)

删除群公告

Parameters:

  • group 进行操作的群组
  • announcementId 删除的群公告id
  • callBack [BMXErrorCode]

Example:

public void deleteAnnouncement(BMXGroup group, long announcementId, BMXCallBack callBack) {
    mService.deleteAnnouncement(group, announcementId, callBack);

function setName

inline void setName(
    final BMXGroup group,
    final String name,
    final BMXCallBack callBack
)

设置群名称

Parameters:

  • group 进行操作的群组
  • name 群组名称
  • callBack [BMXErrorCode]

Example:

public void setName(BMXGroup group, String name, BMXCallBack callBack) {
    mService.setName(group, name, callBack);

function setDescription

inline void setDescription(
    final BMXGroup group,
    final String description,
    final BMXCallBack callBack
)

设置群描述信息

Parameters:

  • group 进行操作的群组
  • description 群组描述
  • callBack [BMXErrorCode]

Example:

public void setDescription(BMXGroup group, String description,BMXCallBack callBack) {
    mService.setDescription(group, description, callBack);

function setExtension

inline void setExtension(
    final BMXGroup group,
    final String extension,
    final BMXCallBack callBack
)

设置群扩展信息

Parameters:

  • group 进行操作的群组
  • extension 群组的扩展信息
  • callBack [BMXErrorCode]

Example:

public void setExtension(BMXGroup group, String extension, BMXCallBack callBack) {
    mService.setExtension(group, extension, callBack);

function setMyNickname

inline void setMyNickname(
    final BMXGroup group,
    final String nickname,
    final BMXCallBack callBack
)

设置在群里的昵称

Parameters:

  • group 进行操作的群组
  • nickname 用户在群组内的昵称
  • callBack [BMXErrorCode]

Example:

public void setMyNickname(BMXGroup group, String nickname, BMXCallBack callBack) {
    mService.setMyNickname(group, nickname, callBack);

function setMsgPushMode

inline void setMsgPushMode(
    final BMXGroup group,
    final BMXGroup.MsgPushMode mode,
    final BMXCallBack callBack
)

设置群消息通知模式

Parameters:

  • group 进行操作的群组
  • mode 群消息通知模式
  • callBack [BMXErrorCode]

Example:

public void setMsgPushMode(BMXGroup group, BMXGroup.MsgPushMode mode, BMXCallBack callBack) {
    mService.setMsgPushMode(group, mode, callBack);

function setJoinAuthMode

inline void setJoinAuthMode(
    final BMXGroup group,
    final BMXGroup.JoinAuthMode mode,
    final BMXCallBack callBack
)

设置入群审批模式

Parameters:

  • group 进行操作的群组
  • mode 入群审批模式
  • callBack [BMXErrorCode]

Example:

public void setJoinAuthMode(BMXGroup group, BMXGroup.JoinAuthMode mode, BMXCallBack callBack) {
    mService.setJoinAuthMode(group, mode, callBack);

function setInviteMode

inline void setInviteMode(
    final BMXGroup group,
    final BMXGroup.InviteMode mode,
    final BMXCallBack callBack
)

设置邀请模式

Parameters:

  • group 进行操作的群组
  • mode 群组的邀请模式
  • callBack [BMXErrorCode]

Example:

public void setInviteMode(BMXGroup group, BMXGroup.InviteMode mode, BMXCallBack callBack) {
    mService.setInviteMode(group, mode, callBack);

function setAvatar

inline void setAvatar(
    final BMXGroup group,
    final String avatarPath,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

设置群头像

Parameters:

  • group 进行操作的群组
  • avatarPath 群头像文件的本地路径
  • listener 上传回调函数
  • callBack [BMXErrorCode]

Example:

public void setAvatar(BMXGroup group, String avatarPath,
        FileProgressListener listener, BMXCallBack callBack) {
    mService.setAvatar(group, avatarPath, listener, callBack);

function downloadAvatar

inline void downloadAvatar(
    final BMXGroup group,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

下载群头像

Parameters:

  • group 进行操作的群组
  • listener 下载回调函数
  • callBack [BMXErrorCode]

Example:

public void downloadAvatar(BMXGroup group, FileProgressListener listener, BMXCallBack callBack) {
    mService.downloadAvatar(group, listener, callBack);

function addGroupListener

inline void addGroupListener(
    BMXGroupServiceListener listener
)

添加群组变化监听者

Parameters:

  • listener 群组变化监听者

Example:

public void addGroupListener(BMXGroupServiceListener listener) {
    mService.addGroupListener(listener);

function removeGroupListener

inline void removeGroupListener(
    BMXGroupServiceListener listener
)

移除群组变化监听者

Parameters:

  • listener 群组变化监听者

Example:

public void removeGroupListener(BMXGroupServiceListener listener) {
    mService.removeGroupListener(listener);

function setEnableReadAck

inline void setEnableReadAck(
    final BMXGroup group,
    final boolean enable,
    final BMXCallBack callBack
)

设置是否开启群消息已读功能

Parameters:

  • group 进行操作的群组
  • enable 是否开启
  • callBack [BMXErrorCode]

Example:

public void setEnableReadAck(BMXGroup group, boolean enable, BMXCallBack callBack) {
    mService.setEnableReadAck(group, enable, callBack);


Updated on 2022-01-26 at 17:18:31 +0800

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-09-21 11:43:07

results matching ""

    No results matching ""