SDKsAndroid
发布或更新群公告
通过 GroupInfo.notification 发布或更新群公告。
构造包含 groupID 与 notification 的 GroupInfo,再调用 setGroupInfo()。
GroupInfo update = new GroupInfo();
update.setGroupID(groupID);
update.setNotification("今晚 20:00 进行版本发布确认。");
OpenIMClient.getInstance().groupManager.setGroupInfo(update, new OnBase<String>() {
@Override public void onSuccess(String data) { /* 请求已完成。 */ }
@Override public void onError(int code, String error) { /* code 和 error 说明失败原因。 */ }
});公告的更新时间和更新人保存在 GroupInfo 的 notificationUpdateTime、notificationUserID 字段中;需要读取时查询群资料。
这个页面有帮助吗?