agora_chat_SDK
3.8.2
agorajavachatSDK
|
Public Member Functions | |
void | onConnected () |
void | onDisconnected (final int errorCode) |
Chat connection listener For the occasion of onDisconnected during unstable signal condition, you don't need to reconnection manually, chat SDK will handle it automatically There are two states: connected and disconnected
Note: Do not update UI based on those methods, because this is called on worker thread. Also do not put heavy computation work here, which might block other listeners to handle this connection event.
Register: ChatClient.getInstance().chatManager().addConversationListener(mConnectionListener);
Unregister: ChatClient.getInstance().chatManager().removeConversationListener(mConnectionListener);
void io.agora.ConnectionListener.onConnected | ( | ) |
Call back when connected to chat server successfully
void io.agora.ConnectionListener.onDisconnected | ( | final int | errorCode | ) |
Call back when disconnected from chat server Common error code: Error#USER_REMOVED,Error#USER_LOGIN_ANOTHER_DEVICE, Error#SERVER_SERVICE_RESTRICTED,Error#USER_KICKED_BY_CHANGE_PASSWORD and Error#USER_KICKED_BY_OTHER_DEVICE