SetKickedOfflineCallback

introduction

Set user kicked offline callback

Once an account is logged on other platform, the previous login is nullified. And the previous platform will receive this callback. (You may force the previous one exit the APP or rekick)

If kicked offline when offline, then the next login will fail and you may give an emphasized error (Error codeERR_IMSDK_KICKED_BY_OTHERS: 6208) or just ignore it

Online user inter-kick situation:

Logged on Device1, then log on Device2, Device1 will get KickedOfflineCallback

After receiving the callback, you may allow Device1 to login and force Device2 offline.

Offline user inter-kick situation:

Logged on Device1, go offline without logged out. And you logged on Device2, no callbacks

When Device1 relogged in, it will receive Error codeERR_IMSDK_KICKED_BY_OTHERS: 6208 to inform it's kicked by another one.

If needed, Device1 login again, and Device2 will receive KickedOfflineCallback

Parameter details

Parameter name Parameter type Required Description
callback KickedOfflineCallback yes KickedOfflineCallback

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

results matching ""

    No results matching ""