OptionalonOptionalonOptionalonOccurs when the SDK disconnects from the chat server.
The user also remains logged in. For the cases where the user is disconnected by the server, see ChatConnectEventListener.onAppActiveNumberReachLimit, ChatConnectEventListener.onUserDidLoginFromOtherDeviceWithInfo, ChatConnectEventListener.onUserDidRemoveFromServer, ChatConnectEventListener.onUserDidForbidByServer, ChatConnectEventListener.onUserDidChangePassword, ChatConnectEventListener.onUserDidLoginTooManyDevice, ChatConnectEventListener.onUserKickedByOtherDevice, ChatConnectEventListener.onUserAuthenticationFailed.
OptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOccurs when the current user account is logged in to another device.
The user is disconnected by the server.
OptionaldeviceName: string2024-08-15 replace with onUserDidLoginFromOtherDeviceWithInfo
OptionalonOccurs when the current user account is logged in to another device.
The user is disconnected by the server.
Optionalext?: stringOptionalonOptionalonOptionalon
The connection event listener.
In the case of disconnection in an unstable network environment, the app using the SDK receives the
onDisconnectedcallback.You do not need to reconnect manually as the chat SDK will handle it automatically.
There are two connection-related callbacks:
onConnected: Occurs when the connection is set up.onDisconnected: Occurs when the connection breaks down.Adds a connection event listener:
Removes a connection event listener: