ConnectionChangedReason enum Null safety

Reasons for the connection state change.


BannedByServer → const ConnectionChangedReason

The connection between the SDK and Agora’s edge server is banned by Agora’s edge server.

const ConnectionChangedReason(3)
ClientIpAddressChanged → const ConnectionChangedReason

The client IP address has changed, probably due to a change of the network type, IP address, or network port.

const ConnectionChangedReason(13)
Connecting → const ConnectionChangedReason

The SDK is connecting to Agora’s edge server.

const ConnectionChangedReason(0)
Interrupted → const ConnectionChangedReason

The connection between the SDK and Agora’s edge server is interrupted.

const ConnectionChangedReason(2)
InvalidAppId → const ConnectionChangedReason

The specified App ID or Token is invalid. Try to rejoin the channel with a valid App ID or Token.

const ConnectionChangedReason(6)
InvalidChannelName → const ConnectionChangedReason

The specified channel name is invalid. Try to rejoin the channel with a valid channel name.

const ConnectionChangedReason(7)
InvalidToken → const ConnectionChangedReason

The generated token is invalid probably due to the following reasons:

  • The App Certificate for the project is enabled in Console, but you do not use Token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
  • The uid that you specify in the RtcEngine.joinChannel method is different from the uid that you pass for generating the token.
const ConnectionChangedReason(8)
JoinFailed → const ConnectionChangedReason

The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel.

const ConnectionChangedReason(4)
JoinSuccess → const ConnectionChangedReason

The SDK has joined the channel successfully.

const ConnectionChangedReason(1)
KeepAliveTimeout → const ConnectionChangedReason

Timeout for the keep-alive of the connection between the SDK and Agora’s edge server. The connection state changes to:

const ConnectionChangedReason(14)
LeaveChannel → const ConnectionChangedReason

The SDK has left the channel.

const ConnectionChangedReason(5)
ProxyServerInterrupted → const ConnectionChangedReason

In cloud proxy mode, the proxy server connection interrupted.

const ConnectionChangedReason(15)
RejectedByServer → const ConnectionChangedReason

The user is banned by the server.

const ConnectionChangedReason(10)
RenewToken → const ConnectionChangedReason

The token renews.

const ConnectionChangedReason(12)
SettingProxyServer → const ConnectionChangedReason

The SDK tries to reconnect after setting a proxy server.

const ConnectionChangedReason(11)
TokenExpired → const ConnectionChangedReason

The token has expired. Generate a new token from your server.

const ConnectionChangedReason(9)
values → const List<ConnectionChangedReason>

A constant List of the values in this enum, in order of their declaration.

const List<ConnectionChangedReason>


hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]