Gets the chat manager class.
This method can be called only after the chat client is initialized.
The chat manager class.
Gets the contact manager class.
This method can be called only after the chat client is initialized.
The contact manager class.
Gets the current logged-in user ID.
Note
The user ID for successful login is valid.
The user ID is obtained from the memory and updated in the case of login, logout, and reconnection upon disconnection. You can call getCurrentUsername to get the latest data from the server.
The current logged-in user ID.
Gets the chat group manager class.
This method can be called only after the chat client is initialized.
The chat group manager class.
Gets the SDK configurations.
Ensure that you set the SDK options during initialization. See ChatOptions.
The SDK configurations.
Gets the presence manager class.
This method can be called only after the chat client is initialized.
The presence manager class.
Gets the push manager class.
This method can be called only after the chat client is initialized.
The push manager class.
Gets the chat room manager class.
This method can be called only after the chat client is initialized.
The chat room manager class.
Gets the user information manager class.
This method can be called only after the chat client is initialized.
The user information manager class.
Adds the connection status listener.
The connection status listener to add.
Adds a custom listener to receive data that the iOS or Android devices send to the React Native layer.
The custom listener to add.
Adds the multi-device listener.
The multi-device listener to add.
Updates the App Key, which is the unique identifier used to access the chat service.
Note
As this key controls access to the chat service for your app, you can only update the key when the current user is logged out.
Updating the App Key means to switch to a new App Key.
You can retrieve the new App Key from the Console.
You can also set an App Key by using the ChatOptions.appKey method when logged out.
The new App Key. Ensure that you set this parameter.
Compresses the debug log file into a gzip archive.
We strongly recommend that you delete this debug archive once it is no longer used.
The path of the compressed gzip file.
Creates a new user (open registration).
Note
There are two registration modes:
Open registration: This mode is for testing use, but not recommended in a formal environment; If a call failure occurs, you can contact our business manager.
Authorized registration: You can create a new user through a REST API, and then save it to your server or return it to the client.
The user ID. Ensure that you set this parameter. The user ID can be a maximum of 64 characters of the following types: - 26 English letters (a-z) - 10 numbers (0-9), - "", "-", "." The user ID is case-insensitive, so Aa and aa are the same user ID. The email address or the UUID of the user cannot be used as the user ID. You can also set this parameter with the regular expression ^[a-zA-Z0-9-]+$.
The password. Ensure that you set this parameter. The password can contain a maximum of 64 characters.
Gets the token for login.
The token for login.
Gets the current logged-in user ID from the server.
Note
To get the current logged-in user ID from the memory, see currentUserName.
The logged-in user ID.
Gets the list of online devices to which you have logged in with a specified account.
The user ID.
The password or token.
If true, use password, otherwise use token. Default is true. See {@link pwdOrToken}
The list of the online logged-in devices.
Initializes the SDK.
Note
The options for SDK initialization. Ensure that you set the options. See ChatOptions.
Checks whether the SDK is connected to the chat server.
Whether the SDK is connected to the chat server.
- true
: Yes.
- false
: No.
Checks whether the current user is logged in to the app.
Note
This method needs to be called after initialization and before login.
Whether the user is logged in to the app:
- true
: The user is logged in to the app. In automatic login mode, the SDK returns true
before successful login and false
otherwise.
- false
: The user is not logged in to the app. In non-automatic login mode, the SDK returns false
.
Logs out from a specified account on all devices.
The user ID.
The password or token.
Whether the password or user token is used. See {@link pwdOrToken}.
true
:The password is used.false
: The user token is used.Logs out from a specified account on a device.
For how to get the device ID, see ChatDeviceInfo.resource.
The user ID.
The password or token.
The device ID. See ChatDeviceInfo.resource.
Whether the password or user token is used. See {@link pwdOrToken}.
true
:The password is used.false
: The user token is used.Logs in to the chat server with a password or an Easemob token. An exception message is thrown if the login fails.
Note
If you use an Easemob token to log in to the server, you can get the token in either of the following ways:
The token expiration reminder is notified by the two callback methods: ChatConnectEventListener.onTokenWillExpire and ChatConnectEventListener.onTokenDidExpire.
The user ID. See createAccount.
The password or token. See createAccount or getAccessToken
Whether to log in with a password or a token.
- true
: A token is used.
- (Default) false
: A password is used.
Logs in to the chat server with the user ID and an Agora token. An exception message is thrown if the login fails.
Note
The Agora token is different from token {@link login.token} provided by Easemob.
This method supports automatic login.
The user ID. See createAccount.
The Agora token.
Logs out of the chat app. An exception message is thrown if the logout fails.
Whether to unbind the token upon logout. This parameter is available only to mobile platforms.
true
: Yes.false
: No.Removes all the connection status listeners for the chat server.
Removes all the custom listeners.
Removes all the multi-device listeners.
Removes the connection status listener.
The connection status listener to remove.
Removes a custom listener to stop receiving data that the iOS or Android devices send to the React Native layer.
The custom listener to remove.
Removes the specified multi-device listener.
The multi-device listener to remove.
Renews the Agora token.
Note
If you log in with an Agora token and are notified by the callback method ChatConnectEventListener that the token is to expire, you can call this method to update the token to avoid unknown issues caused by an invalid token.
The new Agora token.
Update push configurations.
Note For the iOS platform, you need to pass the device ID during initialization. Otherwise, the push function cannot be used properly. See ChatClient.init
The push config, See ChatPushConfig
Generated using TypeDoc
export manager