CONNECTION_CHANGED_REASON_TYPE

The reason for connection state change.

Enumerations

CONNECTION_CHANGED_CONNECTING
(0): The SDK is connecting to the Agora edge server.
CONNECTION_CHANGED_JOIN_SUCCESS
(1): The SDK has successfully joined the channel.
CONNECTION_CHANGED_INTERRUPTED
(2): The connection between the SDK and Agora edge server is interrupted.
CONNECTION_CHANGED_BANNED_BY_SERVER
(3): The connection between the SDK and Agora edge server is banned by the server. For example, this state is returned when a user is kicked from the channel.
CONNECTION_CHANGED_JOIN_FAILED
(4): The SDK failed to join the channel. If joining fails for more than 20 minutes, this status code is returned and reconnection stops. You should prompt the user to switch networks and rejoin the channel.
CONNECTION_CHANGED_LEAVE_CHANNEL
(5): The SDK has left the channel.
CONNECTION_CHANGED_INVALID_APP_ID
(6): Invalid App ID. Please rejoin the channel using a valid App ID and ensure it matches the one generated in the Agora Console.
CONNECTION_CHANGED_INVALID_CHANNEL_NAME
(7): Invalid channel name. Please rejoin the channel using a valid name. The channel name is a string of up to 64 bytes, supporting 89 characters including: lowercase letters a–z, uppercase letters A–Z, digits 0–9, and the following symbols: ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
CONNECTION_CHANGED_INVALID_TOKEN
(8): Invalid Token. Possible reasons: the project has App Certificate enabled in the Agora Console but no Token is provided when joining the channel; the uid specified in joinChannel does not match the one used to generate the Token; the generated Token does not match the one used to join. Ensure that: a Token is provided when joining channels for projects with App Certificate enabled; the user ID used to generate the Token matches the one used to join; the generated Token matches the one passed in.
CONNECTION_CHANGED_TOKEN_EXPIRED
(9): The current Token has expired. You need to generate a new Token on your server and rejoin the channel using it.
CONNECTION_CHANGED_REJECTED_BY_SERVER
(10): The connection is rejected by the server. Possible reasons: the user is already in the channel and calls joinChannel again — stop calling the method to clear the error; the user tries to join a channel during a call test — join after the test ends.
CONNECTION_CHANGED_SETTING_PROXY_SERVER
(11): The SDK sets a proxy server, and the connection state changes to reconnecting.
CONNECTION_CHANGED_RENEW_TOKEN
(12): The connection state changes due to Token renewal.
CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED
(13): The client IP address has changed. If this status code is received multiple times, prompt the user to switch networks and rejoin the channel.
CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT
(14): The keep-alive connection between the SDK and Agora edge server times out. The SDK will automatically attempt to reconnect.
CONNECTION_CHANGED_REJOIN_SUCCESS
(15): The user has successfully rejoined the channel.
CONNECTION_CHANGED_LOST
(16): The connection between the SDK and the server is lost.
CONNECTION_CHANGED_ECHO_TEST
(17): The connection state changes due to echo test.
CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED_BY_USER
(18): The local IP address is changed by the user.
CONNECTION_CHANGED_SAME_UID_LOGIN
(19): The same UID is used to join the same channel on different devices.
Note: Using the same UID to join the same channel is undefined behavior. Agora does not guarantee that all such cases will receive reason 19.
CONNECTION_CHANGED_TOO_MANY_BROADCASTERS
(20): The number of broadcasters in the channel has reached the limit.
CONNECTION_CHANGED_LICENSE_VALIDATION_FAILURE
(21): The connection fails due to license validation failure.
CONNECTION_CHANGED_CERTIFICATION_VERYFY_FAILURE
(22): The connection fails due to certificate verification failure.
CONNECTION_CHANGED_STREAM_CHANNEL_NOT_AVAILABLE
(23): The connection fails because stream channel permission is not granted.
CONNECTION_CHANGED_INCONSISTENT_APPID
(24): The connection fails due to inconsistent App ID used when joining the channel.