subscribeUserStatus
Introduction
Subscribe the user status changes events.
This method can be used for listen the changes of the online status and the custom status of other users.
onUserStatusChanged will be triggered after the user status changes, after subscribed.
This method is not allowed to subscribe self, while you can do this by listen to onUserStatusChanged callback.
There are limits on the number of subscribed users, subscribers who subscribe first will be eliminated, when the limit is exceeded.
This method only works with Ultimate Edition, you can find the pricing plan here.
Only works since version of 4.0.8.
Do not works on Web.
Parameter details
| Parameter name | Parameter type | Required | Platform | Description |
|---|---|---|---|---|
| userIDList | List< String > | yes | All | The user ID list for subscribe. |
Returned template
V2TimCallback
{
code : int
desc : String
}
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. |
Code example
V2TimCallback subscribeUserStatusRes = await TencentImSDKPlugin.v2TIMManager
.subscribeUserStatus(userIDList: []);
if (subscribeUserStatusRes.code == 0) {
}