getUserStatus
Introduction
Get the online status of the users.
Only works since version of 4.0.3.
Do not works on Web.
Parameter details
Parameter name | Parameter type | Required | Platform | Description |
---|---|---|---|---|
userIDList | List< String > | yes | All | The list of users needs to query. |
Returned template
V2TimValueCallback<List<V2TimUserStatus>>
{
code : int
desc : String
data : List<V2TimUserStatus>//The list of online status results.
}
Return value details
name | type | description |
---|---|---|
code | int | Request result: Error codes. 0 means success. |
desc | String | The description of the error. It will be empty if success. |
data | List< V2TimUserStatus > | The list of online status results. |
Code example
V2TimValueCallback<List<V2TimUserStatus>> getUserStatusRes =
await TencentImSDKPlugin.v2TIMManager.getUserStatus(userIDList: []);
if (getUserStatusRes.code == 0) {
getUserStatusRes.data?.forEach((element) {
element.customStatus;
element.statusType;
element.userID;
});
}