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.
V2TIMFriendInfo

Public Member Functions

 V2TIMFriendInfo ()
 
String getUserID ()
 
void setUserID (String userID)
 
String getFriendRemark ()
 
void setFriendRemark (String friendRemark)
 
long getFriendAddTime ()
 
List< String > getFriendGroups ()
 
HashMap< String, byte[]> getFriendCustomInfo ()
 
void setFriendCustomInfo (HashMap< String, byte[]> customHashMap)
 
V2TIMUserFullInfo getUserProfile ()
 
String toString ()
 

Static Public Attributes

static final int V2TIM_FRIEND_TYPE_SINGLE = 1
 
static final int V2TIM_FRIEND_TYPE_BOTH = 2
 

Constructor & Destructor Documentation

◆ V2TIMFriendInfo()

V2TIMFriendInfo ( )
inline

Member Function Documentation

◆ getUserID()

String getUserID ( )
inline

Get the userID of a user

Returns
User's userID

◆ setUserID()

void setUserID ( String  userID)
inline

Set the userID of the user whose profile is to be modified

Parameters
userIDUser's userID

◆ getFriendRemark()

String getFriendRemark ( )
inline

Get friend remarks

Returns
Remarks

◆ setFriendRemark()

void setFriendRemark ( String  friendRemark)
inline

Set friend remarks

Attention
  • The maximum length of friend remarks cannot exceed 96 bytes.
  • For field descriptions, see Console.
Parameters
friendRemarkRemarks

◆ getFriendAddTime()

long getFriendAddTime ( )
inline

Get UTC timestamp of adding friend

◆ getFriendGroups()

List<String> getFriendGroups ( )
inline

Lists to which a friend belongs

Attention
  • A maximum of 32 lists are supported.
  • The list name cannot be empty.
  • The length of a list name cannot exceed 30 bytes
  • The same friend can belong to multiple different lists.
  • For field descriptions, see Console.

◆ getFriendCustomInfo()

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

Get custom friend fields

Returns
Custom fields

◆ setFriendCustomInfo()

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

Set a custom friend field

Attention
First, you need to set the custom friend field in the console (Feature Configuration -> Custom Friend Field). Then you need to call this API to set the custom friend field. The value of key does not need the Tag_SNS_Custom_ prefix.
Parameters
customHashMapCustom fields

◆ getUserProfile()

V2TIMUserFullInfo getUserProfile ( )
inline

Get the user profile of a friend

Returns
User profile

◆ toString()

String toString ( )
inline

Field Documentation

◆ V2TIM_FRIEND_TYPE_SINGLE

final int V2TIM_FRIEND_TYPE_SINGLE = 1
static

One-way friend

◆ V2TIM_FRIEND_TYPE_BOTH

final int V2TIM_FRIEND_TYPE_BOTH = 2
static

Two-way friend