Chat SDK for Android v1.2.1
agora java chat SDK
|
The settings of the chat SDK. You can set parameters and options of the SDK. For example, whether to encrypt the messages before sending, whether to automatically accept the friend invitations.
void io.agora.chat.ChatOptions.allowChatroomOwnerLeave | ( | boolean | allowed | ) |
Sets whether to allow the chat room owner to leave the chat room.
allowed | Whether to allow the owner of chat room to leave.
|
boolean io.agora.chat.ChatOptions.autoAcceptGroupInvitations | ( | ) |
Gets whether to accept group invitations automatically.
true
: Accept group invitations automatically.false
: Do not accept group invitations automatically. boolean io.agora.chat.ChatOptions.canChatroomOwnerLeave | ( | ) |
Gets whether to allow owner of chat room to leave.
true
: When the owner leave, do not keep the conversation;false
: When the owner leave, do keep the conversation. boolean io.agora.chat.ChatOptions.deleteMessagesOnLeaveChatroom | ( | ) |
Gets whether to delete the chat room message when leaving the chat room.
true
: Delete the chat room related message record when leaving the chat room.false
: Do not delete the chat room related message record when leaving the chat room. boolean io.agora.chat.ChatOptions.deleteMessagesOnLeaveGroup | ( | ) |
Gets whether to delete the group message when leaving a group.
true
: Delete the messages when leaving a group.false
: Do not delete the messages when leaving a group. void io.agora.chat.ChatOptions.enableDNSConfig | ( | boolean | enable | ) |
Sets whether to disable DNS.
true
: Disable DNS;false
: Do not disable DNS. boolean io.agora.chat.ChatOptions.getAcceptInvitationAlways | ( | ) |
Gets whether to accept other user's friend invitations automatically.
true
: Accepting friend invitation automatically.false
: Do not accepting friend invitation automatically. String io.agora.chat.ChatOptions.getAccessToken | ( | ) |
Gets the access token from the local database.
String io.agora.chat.ChatOptions.getAccessToken | ( | boolean | b | ) |
Whether to get the access token from the server.
b | Whether to get the access token from server.
|
String io.agora.chat.ChatOptions.getAppKey | ( | ) |
Gets the app key.
int io.agora.chat.ChatOptions.getAreaCode | ( | ) |
Gets the area code and follows zone restrictions when using edge nodes
boolean io.agora.chat.ChatOptions.getAutodownloadThumbnail | ( | ) |
Gets whether to download the thumbnail automatically.
true
: Download the thumbnail automatically;false
: Do not download the thumbnail automatically. boolean io.agora.chat.ChatOptions.getAutoLogin | ( | ) |
Checks whether the automatic login is enabled.
true
: Automatic login is enabled;false
: Automatic login is disabled. boolean io.agora.chat.ChatOptions.getAutoTransferMessageAttachments | ( | ) |
Gets whether to upload the message attachments automatically to the chat server.
true
: Use the default way to upload and download the message attachments by chat server;false
: Do not use the default way to upload and download the message attachments by chat server, using a customized path instead. String io.agora.chat.ChatOptions.getCustomDeviceName | ( | ) |
Obtain the name of the user-defined device
int io.agora.chat.ChatOptions.getCustomOSPlatform | ( | ) |
Gets custom platform code
String io.agora.chat.ChatOptions.getDnsUrl | ( | ) |
Gets the DNS url.
boolean io.agora.chat.ChatOptions.getEnableDNSConfig | ( | ) |
Gets whether to disable DNS.
true
: Disable DNS;false
: Do not disable DNS.int io.agora.chat.ChatOptions.getFixedInterval | ( | ) |
Gets the fixed heart beat interval.
boolean io.agora.chat.ChatOptions.getFpaEnable | ( | ) |
Gets whether the fpa function is used.
false
: the fpa function is not used.true
: the fpa function is used; int io.agora.chat.ChatOptions.getImPort | ( | ) |
Gets the im server port.
String io.agora.chat.ChatOptions.getImServer | ( | ) |
Gets the im server url.
PushConfig io.agora.chat.ChatOptions.getPushConfig | ( | ) |
Gets the push configuration setting options by user.
String io.agora.chat.ChatOptions.getReportServer | ( | ) |
Gets the report server.
boolean io.agora.chat.ChatOptions.getRequireAck | ( | ) |
Gets whether the read receipt is required by the message receiver.
true
: The read receipt is required;false
: The read receipt is not required. boolean io.agora.chat.ChatOptions.getRequireDeliveryAck | ( | ) |
Gets whether the delivery receipt is required.
true
: The read receipt is required;false
: The read receipt is not required. String io.agora.chat.ChatOptions.getRestServer | ( | ) |
Gets the REST server.
boolean io.agora.chat.ChatOptions.getUsingHttpsOnly | ( | ) |
Gets whether only HTTPS is used for REST operations.
true
: Only HTTPS is used;false
: Both HTTP and HTTPS can be used. String io.agora.chat.ChatOptions.getVersion | ( | ) |
Gets the SDK version.
boolean io.agora.chat.ChatOptions.isAutoAcceptGroupInvitation | ( | ) |
Gets whether to accept a group invitation automatically.
true
: Accept group invitations automatically;false
: Do not accept group invitations automatically.boolean io.agora.chat.ChatOptions.isChatroomOwnerLeaveAllowed | ( | ) |
Gets whether to allow the owner of chat room to leave.
true
: When the owner leave, do not keep the conversation;false
: When the owner leave do keep the conversation. boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitChatRoom | ( | ) |
Gets whether to delete the chat room message when leaving the chat room.
true
: Delete the chat room related message record when leaving the chat room.false
: Do not delete the chat room related message record when leaving the chat room.boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitGroup | ( | ) |
Gets whether to delete the group message when leaving a group.
true
: Delete the messages when leaving a group.false
: Do not delete the messages when leaving a group.boolean io.agora.chat.ChatOptions.isEnableStatistics | ( | ) |
Checks whether the traffic statistics collection is enabled for local messages.
true
: Enabled;false
: Disabled. boolean io.agora.chat.ChatOptions.isLoadEmptyConversations | ( | ) |
Checks whether to include empty conversations when the SDK loads conversations from the local database.
false
: Empty conversations are excluded.true
: Empty conversations are included. boolean io.agora.chat.ChatOptions.isSortMessageByServerTime | ( | ) |
Gets whether to sort messages by the server received time.
true
: Sort messages by the server received time;false
: Do not sort messages by the server received time. void io.agora.chat.ChatOptions.setAcceptInvitationAlways | ( | boolean | value | ) |
Sets whether to accept the friend invitation automatically.
value | Whether to accept the friend invitation automatically.
|
void io.agora.chat.ChatOptions.setAppKey | ( | String | appkey | ) |
Sets the app key.
appkey | The app key you got from the console when create an app. |
void io.agora.chat.ChatOptions.setAreaCode | ( | int | code | ) |
sets area code, will follow the area when using edge node.
code | area code.
|
void io.agora.chat.ChatOptions.setAutoAcceptGroupInvitation | ( | boolean | value | ) |
Sets whether to accept a group invitation automatically.
value | Whether to accept group invitation automatically.
|
void io.agora.chat.ChatOptions.setAutoDownloadThumbnail | ( | boolean | autodownload | ) |
Sets whether to auto download the thumbnail.
autodownload | Whether to download the thumbnail automatically.
|
void io.agora.chat.ChatOptions.setAutoLogin | ( | boolean | autoLogin | ) |
Enables/Disables automatic login.
autoLogin |
|
void io.agora.chat.ChatOptions.setAutoTransferMessageAttachments | ( | boolean | transfer | ) |
Sets whether to upload the message attachments automatically to the chat server.
transfer | Whether to upload the message attachments to the chat server.
|
void io.agora.chat.ChatOptions.setCustomDeviceName | ( | @NonNull String | customDeviceName | ) |
Set the current device custom device name. If it is not defined, the system device brand and model name are used by default, for example, HUAWEICOL-AL10. It can be used to distinguish devices when multiple devices log in.Empty strings and null values are not supported. developers can use ChatClient#getLoggedInDevicesFromServer(String, String) for more equipment related information. Sets before calling ChatClient#init(Context, ChatOptions) .
customDeviceName | custom device name |
void io.agora.chat.ChatOptions.setCustomOSPlatform | ( | int | platform | ) |
set custom platform code . Sets before calling ChatClient#init(Context, ChatOptions) .
platform | custom platform code,The value ranges from 1 to 100 |
void io.agora.chat.ChatOptions.setDeleteMessagesAsExitChatRoom | ( | boolean | delete | ) |
Sets whether to delete the chat room message when leaving the chat room.
delete | -(Default)true : Delete the chat room related message record when leaving the chat room.
|
void io.agora.chat.ChatOptions.setDeleteMessagesAsExitGroup | ( | boolean | delete | ) |
Sets whether to delete the group messages when leaving the group.
delete |
|
void io.agora.chat.ChatOptions.setDnsUrl | ( | String | dnsUrl | ) |
Sets the DNS url.
dnsUrl | The DNS url. |
void io.agora.chat.ChatOptions.setEnableStatistics | ( | boolean | enableStatistics | ) |
Sets whether the traffic statistics collection is enabled for local messages. Sets before calling ChatClient#init(Context, ChatOptions).
enableStatistics | Whether the message traffic statistics collection can be enabled:
|
void io.agora.chat.ChatOptions.setFixedHBInterval | ( | int | interval | ) |
Sets a fixed heartbeat interval. If not set, the optimal heartbeat interval is automatically detected.
interval | The interval of heart beat, in seconds (30~300). |
void io.agora.chat.ChatOptions.setFpaEnable | ( | boolean | fpaEnable | ) |
sets Whether to use fpa function.
fpaEnable | Whether to use fpa function.
|
void io.agora.chat.ChatOptions.setImPort | ( | int | imPort | ) |
Sets the custom im server port.
imPort | The im server port. |
void io.agora.chat.ChatOptions.setIMServer | ( | String | imServer | ) |
Sets the custom im message server url.
imServer | The im message server url. |
void io.agora.chat.ChatOptions.setLoadEmptyConversations | ( | boolean | isLoadEmptyConversations | ) |
Sets whether to include empty conversations when the SDK loads conversations from the local database. As for the call sequence, this method comes before ChatClient#init(Context, ChatOptions).
isLoadEmptyConversations | Whether to include empty conversations when the SDK loads conversations from the local database:
|
void io.agora.chat.ChatOptions.setPushConfig | ( | PushConfig | pushConfig | ) |
Sets the push configuration.
pushConfig | The push configuration. |
void io.agora.chat.ChatOptions.setReportServer | ( | String | reportServer | ) |
Sets the custom report server.
reportServer | The report server url. |
void io.agora.chat.ChatOptions.setRequireAck | ( | boolean | requireAck | ) |
Sets whether to require the read receipt.
requireAck | Whether the read receipt is required.
|
void io.agora.chat.ChatOptions.setRequireDeliveryAck | ( | boolean | requireDeliveryAck | ) |
Sets whether the delivery receipt is required.
requireDeliveryAck | Whether the delivery receipt is required.
|
void io.agora.chat.ChatOptions.setRestServer | ( | String | restServer | ) |
Sets the custom REST server.
restServer | The REST server url. |
void io.agora.chat.ChatOptions.setSortMessageByServerTime | ( | boolean | sortByServerTime | ) |
Sets whether to sort messages by server received time.
sortByServerTime |
|
void io.agora.chat.ChatOptions.setUsingHttpsOnly | ( | boolean | _usingHttpsOnly | ) |
Sets whether only HTTPS is used for REST operation.
_usingHttpsOnly | Whether only HTTPS is used.
|