Updated on 2023-03-23 GMT+08:00

Configuring a Profile Picture

Function

This API is used to configure the profile picture information.

Function Prototype

setAvatar(avatarInfo: AvatarInfo, onSetAvatarResult?: (ret: SDKERR, reason: string) => void): voidsetAvatar(avatarInfo: AvatarInfo, onSetAvatarResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
avatarInfo Y AvatarInfo Profile picture information.
onSetAvatarResult Y (ret: SDKERR, reason: string) => void Callback of configuring the profile picture.
Table 2 AvatarInfo
Parameter Mandatory Type Description
number Y string Number.
avatarPath Y string Profile picture path.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 3 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.