Browse SDKs · Android
SDKsAndroid

Publish a group announcement

Publish or update a group announcement through GroupInfo.notification.

Copy

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.