SDKsAndroid
Publish a group announcement
Publish or update a group announcement through GroupInfo.notification.
Create a GroupInfo containing the groupID and notification, then call setGroupInfo().
GroupInfo update = new GroupInfo();
update.setGroupID(groupID);
update.setNotification("Release review starts at 20:00 tonight.");
OpenIMClient.getInstance().groupManager.setGroupInfo(update, new OnBase<String>() {
@Override public void onSuccess(String data) { /* The request completed. */ }
@Override public void onError(int code, String error) { /* code and error describe the failure. */ }
});The update time and author are stored in the GroupInfo fields notificationUpdateTime and notificationUserID. Query the group profile when you need to read them.
A successful callback means that the announcement update request completed; it does not mean that every client has updated its UI. onGroupInfoChanged provides the updated GroupInfo. Merge the announcement and group profile by groupID. See Group overview for the complete listener setup.
Was this page helpful?