Chat SDK for Unity and Windows v1.3.0
Public Member Functions | Public Attributes | List of all members
AgoraChat.Options Class Reference
Inheritance diagram for AgoraChat.Options:

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 = ""
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Options()

AgoraChat.Options.Options ( string  appKey)

The options constructor.

Parameters
appKeyThe App Key.

Member Data Documentation

◆ AppKey

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.

◆ DNSURL

string AgoraChat.Options.DNSURL = ""

The URL of the DNS server.

◆ IMServer

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.

◆ RestServer

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.

◆ IMPort

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.

◆ EnableDNSConfig

bool AgoraChat.Options.EnableDNSConfig = true

Whether to enable DNS.

  • (Default) true: Yes.
  • false: No. DNS should be disabled for private deployment.

◆ DebugMode

bool AgoraChat.Options.DebugMode = false

Whether to output the debug information as logs.

  • true: Yes.
  • (Default) false: No.

◆ AutoLogin

bool AgoraChat.Options.AutoLogin = false

Whether to enable automatic login.

  • true: Yes.
  • (Default)false: No.

◆ AcceptInvitationAlways

bool AgoraChat.Options.AcceptInvitationAlways = false

Whether to automatically accept friend invitations from other users.

  • true: Yes.
  • (Default) false: No.

◆ AutoAcceptGroupInvitation

bool AgoraChat.Options.AutoAcceptGroupInvitation = false

Whether to accept group invitations automatically.

  • (Default) true: Yes.
  • false: No.

◆ RequireAck

bool AgoraChat.Options.RequireAck = true

Whether to require the read receipt.

  • (Default) true: Yes;
  • false: No.

◆ RequireDeliveryAck

bool AgoraChat.Options.RequireDeliveryAck = false

Whether to require the delivery receipt.

  • (Default) true: Yes;
  • false: No.

◆ DeleteMessagesAsExitGroup

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).

  • (Default) true: Yes;
  • false: No.

◆ DeleteMessagesAsExitRoom

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).

  • (Default) true: Yes.
  • false: No.

◆ IsRoomOwnerLeaveAllowed

bool AgoraChat.Options.IsRoomOwnerLeaveAllowed = true

Whether to allow the chat room owner to leave the chat room.

  • (Default) 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.

◆ SortMessageByServerTime

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.

  • (Default) true: Yes;
  • false: No. Messages are sorted in the reverse chronological order of the time when they are created.

◆ UsingHttpsOnly

bool AgoraChat.Options.UsingHttpsOnly = true

Whether only HTTPS is used for REST operations.

  • (Default) true: Only HTTPS is supported.
  • false: Both HTTP and HTTPS are allowed.

◆ ServerTransfer

bool AgoraChat.Options.ServerTransfer = true

Whether to upload the message attachments automatically to the chat server.

  • (Default) true: Yes;
  • false: No.

◆ IsAutoDownload

bool AgoraChat.Options.IsAutoDownload = true

Whether to automatically download the thumbnail.

  • (Default) true: Yes;
  • false: No.

◆ EnableEmptyConversation

bool AgoraChat.Options.EnableEmptyConversation = false

Whether to include empty conversations while loading conversations from the database. -true: Yes; -(Default) false: No.

◆ UseReplacedMessageContents

bool AgoraChat.Options.UseReplacedMessageContents = false

Whether the server returns the sender the text message with the content replaced during text moderation.

  • true: Yes.
  • (Default) false: No. The server returns the original message to the sender.

◆ IncludeSendMessageInMessageListener

bool AgoraChat.Options.IncludeSendMessageInMessageListener = false

Sets whether to include the sent message in IChatManagerDelegate#OnMessagesReceived.

  • true: Yes;
  • (Default) false: No.

◆ CustomOSType

int AgoraChat.Options.CustomOSType = -1

The custom system type.

◆ CustomDeviceName

string AgoraChat.Options.CustomDeviceName = ""

The custom device name.

◆ AreaCode

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.

◆ MyUUID

string AgoraChat.Options.MyUUID = ""

The UUID for the current device.

◆ RegardImportMsgAsRead

bool AgoraChat.Options.RegardImportMsgAsRead = false

Whether to regard import messages as read. -true: Yes; -(Default) false: No.

◆ SDKDataPath

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:

  • Method 1: Set SDKDataPath to the current path ".".
  • Method 2: Copy the sdkdata folder in the original current path to the persistent directory Application.persistentDataPath. For the Windows SDK, SDKDataPath still uses the current path ".".

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".