ConnectionChangedReasonType
Reason for changes 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 a 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 it 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 include:
- Your project has enabled App Certificate, but you joined the channel without using a Token.
- The user ID specified when calling joinChannel does not match the one used when generating the Token.
- The Token used to join the channel is different from the one generated.
- When your project has enabled App Certificate, use a Token to join the channel.
- The user ID specified when generating the Token matches the one used to join the channel.
- The Token used to join the channel matches the one generated.
- 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 include:
- The user has already joined the channel and calls the join API again, such as joinChannel, which returns this status. Stop calling the method.
- The user tries to join a channel during a call test. Wait until the 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 occurs multiple times, prompt the user to switch networks and try rejoining the channel.
- connectionChangedKeepAliveTimeout
- 14: 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 user.
- connectionChangedSameUidLogin
- 19: Joined the same channel from different devices using the same UID.
- connectionChangedTooManyBroadcasters
- 20: The number of broadcasters in the channel has reached the limit.