Browse SDKs · Android
SDKsAndroid

Set group extra data

Store application-defined group data in GroupInfo.ex.

Copy

GroupInfo.ex is a complete string; the SDK does not merge JSON values. Submitting a new value replaces the previous content.

GroupInfo update = new GroupInfo();
update.setGroupID(groupID);
update.setEx("{\"projectCode\":\"mobile\",\"archived\":false}");

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. */ }
});