OptionalonThe number of daily active users (DAU) or monthly active users (MAU) for the app has reached the upper limit.
The user is disconnected by the server.
OptionalonOccurs when the SDK connects to the chat server successfully.
OptionalonOccurs 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.onUserDidLoginFromOtherDevice, ChatConnectEventListener.onUserDidRemoveFromServer, ChatConnectEventListener.onUserDidForbidByServer, ChatConnectEventListener.onUserDidChangePassword, ChatConnectEventListener.onUserDidLoginTooManyDevice, ChatConnectEventListener.onUserKickedByOtherDevice, ChatConnectEventListener.onUserAuthenticationFailed.
OptionalonOccurs when the Agora token has expired.
OptionalonOccurs when the Agora token is about to expire.
OptionalonOccurs when the current chat user authentication failed.
This callback is triggered in the following typical scenarios: The token expires or token authentication fails.
The user is disconnected by the server.
OptionalonOccurs when the current chat user changed the password.
The user is disconnected by the server.
OptionalonOccurs when the current chat user is banned from accessing the server.
The user is disconnected by the server.
OptionalonOccurs when the current user account is logged in to another device.
The user is disconnected by the server.
OptionaldeviceName: stringOptionalonOccurs when the current chat user logged in to many devices.
The user is disconnected by the server.
OptionalonOccurs when the current chat user is removed from the server.
The user is disconnected by the server.
OptionalonOccurs when the current chat user is kicked out of the app by another device.
The user is disconnected by the server.
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: