Help Center/ Meeting/ Client SDK Reference/ Android SDK/ APIs/ UI Customization/ Setting the Profile Picture Style
Updated on 2025-05-29 GMT+08:00

Setting the Profile Picture Style

setParticipantAvatarStyle:

API Description

This API is used to set the profile picture style of participants.

Precautions

  1. This API is optional. If it is not called, the default profile picture style is used.

Method Definition

- void setParticipantAvatarStyle(HWMAvatarStyle avatarStyle);

Parameter Description

Table 1 HWMAvatarStyle description

Parameter

Mandatory

Type

Description

backgroundColor

Yes

int

Background color.

textColor

Yes

int

Text color.

nameShowType

Yes

NameShowType

Name display style.

avatarShape

Yes

AvatarShape

Profile picture shape.

phoneIcon

Yes

Bitmap

Profile picture of PSTN users.

boardIcon

Yes

Bitmap

Profile picture of large display users.

Table 2 Enumerated values of NameShowType

Enumerated Value

Description

FIRST_LETTER

For a Chinese name, the first letter in pinyin is displayed. For an English name, the first letter is displayed.

FAMILY_NAME

For a Chinese name, the family name is displayed. For an English name, the first letter is displayed.

Table 3 Enumerated values of AvatarShape

Enumerated Value

Description

CIRCLE

Circle.

Return Values

Whether the API is successfully called.

Sample Code

HWMAvatarStyle style = new HWMAvatarStyle(backgroundColor, textColor, HWMAvatarStyle.NameShowType.FAMILY_NAME, HWMAvatarStyle.AvatarShape.CIRCLE);
HWMBizSdk.getBizOpenApi().setParticipantAvatarStyle(style);