Chat SDK for Unity and Windows v1.3.0
|
Public Member Functions | |
Options (string appKey) | |
Public Attributes | |
string | AppKey = "" |
string | DNSURL = "" |
string | IMServer = "" |
string | RestServer = "" |
int | IMPort = 0 |
bool | EnableDNSConfig = true |
bool | DebugMode = false |
bool | AutoLogin = false |
bool | AcceptInvitationAlways = false |
bool | AutoAcceptGroupInvitation = false |
bool | RequireAck = true |
bool | RequireDeliveryAck = false |
bool | DeleteMessagesAsExitGroup = true |
bool | DeleteMessagesAsExitRoom = true |
bool | IsRoomOwnerLeaveAllowed = true |
bool | SortMessageByServerTime = true |
bool | UsingHttpsOnly = true |
bool | ServerTransfer = true |
bool | IsAutoDownload = true |
bool | EnableEmptyConversation = false |
bool | UseReplacedMessageContents = false |
bool | IncludeSendMessageInMessageListener = false |
int | CustomOSType = -1 |
string | CustomDeviceName = "" |
AreaCode | AreaCode = AreaCode.GLOB |
string | MyUUID = "" |
bool | RegardImportMsgAsRead = false |
string | SDKDataPath = "" |
The chat setting class that defines parameters and options of the SDK, including whether to automatically accept friend invitations and whether to automatically download the thumbnail.
AgoraChat.Options.Options | ( | string | appKey | ) |
The options constructor.
appKey | The App Key. |
string AgoraChat.Options.AppKey = "" |
The App Key you get from the console when creating a chat app. It is the unique identifier of your app.
string AgoraChat.Options.DNSURL = "" |
The URL of the DNS server.
string AgoraChat.Options.IMServer = "" |
The address of the IM server.
This address is used when you implement data isolation and data security during private deployment.
If you need the address, contact our business manager.
string AgoraChat.Options.RestServer = "" |
The address of the REST server.
This address is used when you implement data isolation and data security during private deployment.
If you need the address, contact our business manager.
int AgoraChat.Options.IMPort = 0 |
The custom port of the IM server.
This port is used when you implement data isolation and data security during private deployment.
If you need the port, contact our business manager.
bool AgoraChat.Options.EnableDNSConfig = true |
Whether to enable DNS.
true
: Yes.false
: No. DNS should be disabled for private deployment. bool AgoraChat.Options.DebugMode = false |
Whether to output the debug information as logs.
true
: Yes.false
: No. bool AgoraChat.Options.AutoLogin = false |
Whether to enable automatic login.
true
: Yes.false
: No. bool AgoraChat.Options.AcceptInvitationAlways = false |
Whether to automatically accept friend invitations from other users.
true
: Yes.false
: No. bool AgoraChat.Options.AutoAcceptGroupInvitation = false |
Whether to accept group invitations automatically.
true
: Yes.false
: No. bool AgoraChat.Options.RequireAck = true |
Whether to require the read receipt.
true
: Yes;false
: No. bool AgoraChat.Options.RequireDeliveryAck = false |
Whether to require the delivery receipt.
true
: Yes;false
: No. bool AgoraChat.Options.DeleteMessagesAsExitGroup = true |
Whether to delete the historical group messages in the memory and local database when leaving the group (either voluntarily or passively).
true
: Yes;false
: No. bool AgoraChat.Options.DeleteMessagesAsExitRoom = true |
Whether to delete the historical messages of the chat room in the memory and local database when leaving the chat room (either voluntarily or passively).
true
: Yes.false
: No. bool AgoraChat.Options.IsRoomOwnerLeaveAllowed = true |
Whether to allow the chat room owner to leave the chat room.
true
: Yes. When leaving the chat room, the chat room owner still has all privileges, except for receiving messages in the chat room.false
: No. bool AgoraChat.Options.SortMessageByServerTime = true |
Whether to sort the messages in the reverse chronological order of the time when they are received by the server.
true
: Yes;false
: No. Messages are sorted in the reverse chronological order of the time when they are created. bool AgoraChat.Options.UsingHttpsOnly = true |
Whether only HTTPS is used for REST operations.
true
: Only HTTPS is supported.false
: Both HTTP and HTTPS are allowed. bool AgoraChat.Options.ServerTransfer = true |
Whether to upload the message attachments automatically to the chat server.
true
: Yes;false
: No. bool AgoraChat.Options.IsAutoDownload = true |
Whether to automatically download the thumbnail.
true
: Yes;false
: No. bool AgoraChat.Options.EnableEmptyConversation = false |
Whether to include empty conversations while loading conversations from the database. -true
: Yes; -(Default) false
: No.
bool AgoraChat.Options.UseReplacedMessageContents = false |
Whether the server returns the sender the text message with the content replaced during text moderation.
true
: Yes.false
: No. The server returns the original message to the sender. bool AgoraChat.Options.IncludeSendMessageInMessageListener = false |
Sets whether to include the sent message in IChatManagerDelegate#OnMessagesReceived
.
true
: Yes;false
: No. int AgoraChat.Options.CustomOSType = -1 |
The custom system type.
string AgoraChat.Options.CustomDeviceName = "" |
The custom device name.
AreaCode AgoraChat.Options.AreaCode = AreaCode.GLOB |
The area code.
Restrictions of the area should be followed when edge nodes are used.
(Default) GLOB
: No restrictions will be applied when you try to access the server node.
string AgoraChat.Options.MyUUID = "" |
The UUID for the current device.
bool AgoraChat.Options.RegardImportMsgAsRead = false |
Whether to regard import messages as read. -true
: Yes; -(Default) false
: No.
string AgoraChat.Options.SDKDataPath = "" |
The underlying storage path for SDK data. The storage path is used only for MacOS and Windows platforms.
If this parameter is not set, the SDK will set the default value.
Note: For the Unity SDK, prior to v1.1.2, SDKDataPath was set to the current path ".". Starting from v1.1.2, this path has been changed to the persistent directory Application.persistentDataPath. If you are upgrading from an SDK version earlier than v1.1.2 and need to retain the local historical messages, there are two methods:
For example: MacOS: /Users/UserName/Library/Application Support/DefaultCompany/xxx Windows: C:/Users/UserName/AppData/LocalLow/DefaultCompany/xxx
If the data storage path ends with a folder name, it is unnecessary to appended "/" to the end of the path.
Note: For MacOS, if you set SDKDatapath
to a relative path, the path must start with ".", for example "./sdkdatapath".