ConnectionChangedReasonType
The reason for the change in network connection state.
Enumerations
- ConnectionChangedConnecting
- 0: Connecting to the network.
- ConnectionChangedJoinSuccess
- 1: Successfully joined the channel.
- ConnectionChangedInterrupted
- 2: Network connection interrupted.
- ConnectionChangedBannedByServer
- 3: Network connection is banned by the server. For example, this status is returned when the user is kicked out of the channel.
- ConnectionChangedJoinFailed
- 4: Failed to join the channel. If the SDK fails to join the channel after trying for 20 minutes, this status is returned and the SDK stops trying to reconnect. Prompt the user to switch networks and try joining the channel again.
- ConnectionChangedLeaveChannel
- 5: Left the channel.
- ConnectionChangedInvalidAppId
- 6: Invalid App ID. Use a valid App ID to rejoin the channel and ensure the App ID matches the one generated in the Agora Console.
- ConnectionChangedInvalidChannelName
- 7: Invalid channel name. Use a valid channel name to rejoin the channel. A valid channel name is a string within 64 bytes. The supported character set includes 89 characters:
- ConnectionChangedInvalidToken
- 8: Invalid Token. Possible reasons:
- Your project has App Certificate enabled, but you joined the channel without using a Token.
- The user ID specified in joinChannel does not match the one used to generate the Token.
- The generated Token does not match the one used to join the channel.
- When App Certificate is enabled, use a Token to join the channel.
- The user ID used to generate the Token matches the one used to join the channel.
- The generated Token matches the one used to join the channel.
- ConnectionChangedTokenExpired
- 9: The current Token has expired. Generate a new Token on your server and use it to rejoin the channel.
- ConnectionChangedRejectedByServer
- 10: This user is banned by the server. Possible reasons:
- The user has already joined the channel and calls the join channel API again, such as joinChannel, which returns this status. Stop calling this method.
- The user tries to join a channel during a call test. Wait until the call test ends before joining the channel.
- ConnectionChangedSettingProxyServer
- 11: SDK attempts to reconnect due to proxy server settings.
- ConnectionChangedRenewToken
- 12: Network connection state changed due to Token renewal.
- ConnectionChangedClientIpAddressChanged
- 13: Client IP address changed. If this status code is received multiple times, prompt the user to switch networks and try rejoining the channel.
- ConnectionChangedKeepAliveTimeout
- 14: Connection keep-alive timeout between SDK and server, entering auto-reconnect state.
- ConnectionChangedRejoinSuccess
- 15: Successfully rejoined the channel.
- ConnectionChangedLost
- 16: SDK lost connection with the server.
- ConnectionChangedEchoTest
- 17: Connection state changed due to echo test.
- ConnectionChangedClientIpAddressChangedByUser
- 18: Local IP address changed by the user.
- ConnectionChangedSameUidLogin
- 19: The same UID joined the same channel from different devices.
- ConnectionChangedTooManyBroadcasters
- 20: The number of broadcasters in the channel has reached the limit.