SetUserStatusChangedCallback
introduction
Set user status updated callback
The following cases may trigger this callback:
Subscribed user status changed (Include online status and custom status)
Enable friend's status notification on the IM Console. It will trigger this callback even you haven't subscribe it
An account logged on multi-platforms, and the status is changed on one of the devices, all platforms will receive this callback
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
callback | UserStatusChangedCallback | no | UserStatusChangedCallback |
stringCallback | UserStatusChangedStringCallback | no | UserStatusChangedStringCallback |
Returned template
TIMResult
The parameters of the callback function after successfully calling the API:
code:int
desc:string
json_param:'' // json_ Params is an empty string ""
user_data:string
Return value details
name | type | description |
---|---|---|
TIMResult | TIMResult | Return value of calling API |
code | int | Result error code: Error Codes |
desc | string | The description of the error. |
json_param | string | Json string. Calling different API will get different Json strings. |
user_data | string | User-defined data transfered by ImSDK without any processing |