IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMUserFullInfo

Public Member Functions

void setNickname (String nickname)
 
void setFaceUrl (String faceUrl)
 
String getSelfSignature ()
 
void setSelfSignature (String selfSignature)
 
int getGender ()
 
void setGender (int gender)
 
int getRole ()
 
void setRole (int role)
 
int getLevel ()
 
void setLevel (int level)
 
int getAllowType ()
 
void setAllowType (int allowType)
 
void setCustomInfo (HashMap< String, byte[]> customHashMap)
 
HashMap< String, byte[]> getCustomInfo ()
 
String toString ()
 
String getUserID ()
 
String getNickName ()
 
String getFaceUrl ()
 
long getBirthday ()
 
void setBirthday (long birthday)
 

Static Public Attributes

static final String PROFILE_TYPE_KEY_NICK = UserInfo.USERINFO_KEY_NICK
 
static final String PROFILE_TYPE_KEY_FACEURL = UserInfo.USERINFO_KEY_FACEURL
 
static final String PROFILE_TYPE_KEY_ALLOWTYPE = UserInfo.USERINFO_KEY_ALLOWTYPE
 
static final String PROFILE_TYPE_KEY_GENDER = UserInfo.USERINFO_KEY_GENDER
 
static final String PROFILE_TYPE_KEY_SELF_SIGNATURE = UserInfo.USERINFO_KEY_SELF_SIGNATURE
 
static final String PROFILE_TYPE_KEY_CUSTOM_PREFIX = UserInfo.USERINFO_KEY_CUSTOM_PREFIX
 
static final int V2TIM_FRIEND_ALLOW_ANY = 0
 
static final int V2TIM_FRIEND_NEED_CONFIRM = 1
 
static final int V2TIM_FRIEND_DENY_ANY = 2
 
static final int V2TIM_GENDER_UNKNOWN = 0
 
static final int V2TIM_GENDER_MALE = 1
 
static final int V2TIM_GENDER_FEMALE = 2
 

Member Function Documentation

◆ setNickname()

void setNickname ( String  nickname)
inline

Set one's own nickname

Parameters
nickname

◆ setFaceUrl()

void setFaceUrl ( String  faceUrl)
inline

Set one's own profile picture

Parameters
faceUrl

◆ getSelfSignature()

String getSelfSignature ( )
inline

Get the user's bio

Returns
The user's bio

◆ setSelfSignature()

void setSelfSignature ( String  selfSignature)
inline

Set one's own bio

Parameters
selfSignatureBio

◆ getGender()

int getGender ( )
inline

Get the gender:

  • V2TIM_GENDER_UNKNOWN: unknown
  • V2TIM_GENDER_MALE: male
  • V2TIM_GENDER_FEMALE: female
Returns
Gender

◆ setGender()

void setGender ( int  gender)
inline

Set one's own gender

  • V2TIM_GENDER_UNKNOWN: unknown
  • V2TIM_GENDER_MALE: male
  • V2TIM_GENDER_FEMALE: female
Parameters
genderGender

◆ getRole()

int getRole ( )
inline

Get the role

◆ setRole()

void setRole ( int  role)
inline

Set the role

◆ getLevel()

int getLevel ( )
inline

Get the level

◆ setLevel()

void setLevel ( int  level)
inline

Set the level

◆ getAllowType()

int getAllowType ( )
inline

Get the friend verification method

  • V2TIM_FRIEND_ALLOW_ANY
  • V2TIM_FRIEND_DENY_ANY
  • V2TIM_FRIEND_NEED_CONFIRM
Returns
Verification method

◆ setAllowType()

void setAllowType ( int  allowType)
inline

Set one's own friend verification option

  • V2TIM_FRIEND_ALLOW_ANY
  • V2TIM_FRIEND_DENY_ANY
  • V2TIM_FRIEND_NEED_CONFIRM
Parameters
allowType

◆ setCustomInfo()

void setCustomInfo ( HashMap< String, byte[]>  customHashMap)
inline

Set a custom field

Attention
You need to configure custom fields in the console first (Configuration -> Custom User Field). Then you can call this API to set the custom fields. You don't need to add the Tag_Profile_Custom_ prefix for keys.
Parameters
customHashMapCustom field hashMap

◆ getCustomInfo()

HashMap<String, byte[]> getCustomInfo ( )
inline

Get custom fields

Returns
Custom field hashMap

◆ toString()

String toString ( )
inline

◆ getUserID()

String getUserID ( )
inlineinherited

Get the user ID

Returns
User ID

◆ getNickName()

String getNickName ( )
inlineinherited

Get the user nickname

Returns
Nickname

◆ getFaceUrl()

String getFaceUrl ( )
inlineinherited

Get the profile photo URL of a user

Returns
Profile photo URL

◆ getBirthday()

long getBirthday ( )
inlineinherited

Get the user's birthday

Returns
Birthday, in the format such as 19700101

◆ setBirthday()

void setBirthday ( long  birthday)
inlineinherited

Set the user's birthday

@birthday Birthday, in the format such as 19700101

Field Documentation

◆ PROFILE_TYPE_KEY_NICK

final String PROFILE_TYPE_KEY_NICK = UserInfo.USERINFO_KEY_NICK
static

◆ PROFILE_TYPE_KEY_FACEURL

final String PROFILE_TYPE_KEY_FACEURL = UserInfo.USERINFO_KEY_FACEURL
static

◆ PROFILE_TYPE_KEY_ALLOWTYPE

final String PROFILE_TYPE_KEY_ALLOWTYPE = UserInfo.USERINFO_KEY_ALLOWTYPE
static

◆ PROFILE_TYPE_KEY_GENDER

final String PROFILE_TYPE_KEY_GENDER = UserInfo.USERINFO_KEY_GENDER
static

◆ PROFILE_TYPE_KEY_SELF_SIGNATURE

final String PROFILE_TYPE_KEY_SELF_SIGNATURE = UserInfo.USERINFO_KEY_SELF_SIGNATURE
static

◆ PROFILE_TYPE_KEY_CUSTOM_PREFIX

final String PROFILE_TYPE_KEY_CUSTOM_PREFIX = UserInfo.USERINFO_KEY_CUSTOM_PREFIX
static

◆ V2TIM_FRIEND_ALLOW_ANY

final int V2TIM_FRIEND_ALLOW_ANY = 0
static

Automatically accept all new friend requests

◆ V2TIM_FRIEND_NEED_CONFIRM

final int V2TIM_FRIEND_NEED_CONFIRM = 1
static

Friend request verification is required

◆ V2TIM_FRIEND_DENY_ANY

final int V2TIM_FRIEND_DENY_ANY = 2
static

Automatically reject all new friend requests

◆ V2TIM_GENDER_UNKNOWN

final int V2TIM_GENDER_UNKNOWN = 0
static

Unknown gender

◆ V2TIM_GENDER_MALE

final int V2TIM_GENDER_MALE = 1
static

Male

◆ V2TIM_GENDER_FEMALE

final int V2TIM_GENDER_FEMALE = 2
static

Female