Browse SDKs · Android
SDKsAndroid

Set member profile access

Use GroupInfo.lookMemberInfo to control whether users can view member profiles through the group.

Copy

lookMemberInfo is an integer switch: 0 disables access and 1 enables it. Submit only the groupID and this permission field when changing the setting.

GroupInfo update = new GroupInfo();
update.setGroupID(groupID);
update.setLookMemberInfo(1);

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

This switch controls profile access through the group. It does not change user profile data that a member already possesses.

A successful callback means that the permission update request completed; it does not mean that every client has updated its UI. onGroupInfoChanged provides the updated GroupInfo. Merge this permission by groupID. See Group overview for the complete listener setup.