
# 头像拦截显示
**接口描述**
该接口用于定制登录后的头像显示。
**调用场景：**
图1画中画模式
![](https://support.huaweicloud.com/sdkreference-meeting/figure/zh-cn_image_0297610560.jpg)
图2画廊模式
![](https://support.huaweicloud.com/sdkreference-meeting/figure/zh-cn_image_0297610667.jpg)
图3会中与会者列表
![](https://support.huaweicloud.com/sdkreference-meeting/figure/zh-cn_image_0000002206297200.png)
图4悬浮窗
![](https://support.huaweicloud.com/sdkreference-meeting/figure/zh-cn_image_0297610742.jpg)
**注意事项**
未登录的头像不支持自定义。
**方法定义**
```
public Bitmap queryContactAvatar(ContactInfo contactInfo)
```
**参数描述**
 表1ContactInfo参数说明 
| 参数          | 类型     | 描述                |
|:---|:---|:---|
| account     | String | 账号密码登录场景下优先使用此字段  |
| thirdUserId | String | appid登录场景下优先使用此字段 |
| sipNumber   | String | 跨企业场景优先使用此字段      |
| orgId       | String | 企业ID              |
   
**返回值**
表2 
| 参数     | 类型     | 描述    |
|:---|:---|:---|
| bitmap | Bitmap | 头像位图类 |
   
**示例代码**
```
sdkConfig.setQueryContactAvatarStrategy(new IQueryContactAvatarStrategy() {
    @Override
    public Bitmap queryContactAvatar(ContactInfo contactInfo) {
        String extendedField = contactInfo.getExtendedField();
        HCLog.i(TAG, "setQueryContactInfoStrategy account: " + StringUtil.formatString(contactInfo.getAccount())
            + " thirdUserId: " + StringUtil.formatString(contactInfo.getThirdUserId())
            + " sipNumber: " + StringUtil.formatString(contactInfo.getSipNumber())
            + " extendedField: " + StringUtil.formatString(extendedField)
            + " realNameAccount : " + StringUtil.formatName(contactInfo.getRealNameAccount()));
        // 第三方查询通讯录，返回对应用户的头像图片，这里返回一张默认图片作为示例代码
        return BitmapFactory.decodeResource(resources, R.mipmap.ic_launcher);
    }
});
```
