public class SDKOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
animatedImageThumbnailEnabled
Enable support for animation thumbnails.
|
java.lang.String |
appKey
Set the App Key for CommsEase SDK.
|
boolean |
asyncInitSDK
Specify whether Initialize the SDK by making an asynchronous call.
|
AuthProvider |
authProvider
Note: When using dynamic login (LoginInfo.authType equals 1), this interface must be set.
|
CaptureDeviceInfoConfig |
captureDeviceInfoConfig
The configuration for getting the device information
A value of null indicates that the device information can be obtained.
|
int |
cdnRequestDataInterval
Callback interval for CDN information reporting
|
boolean |
checkManifestConfig
Specify whether to check the Manifest configuration
Set the value to true in the debugging stage and false when the debugging is complete.
|
boolean |
clearTimeTagAtBeginning
Specify whether to reset the synchronization timestamp.
|
int |
coreProcessStartTimeout
Timeout for core process startup.
|
java.lang.String |
customPushContentType
The type of the string to be displayed when offline push does not display details
|
java.lang.String |
databaseEncryptKey
The database encryption key, used for message database encryption.
|
static SDKOptions |
DEFAULT |
boolean |
disableAwake
Prevent background processes from waking up the UI process
|
boolean |
enableBackOffReconnectStrategy
Specify whether to use the random reconnection and backoff strategy.
|
boolean |
enableChatRoomLocation
Specify whether to enable the location message functionality in the chat room.
|
boolean |
enableDatabaseBackup
Specify whether to enable database backup
|
boolean |
enableFcs
Specify whether to enable fusion storage
|
boolean |
enableForegroundService
Specify whether to start as a foreground service if NimService fails.
|
boolean |
enableLBSOptimize
Specify whether to enable the network connection optimization strategy.
|
boolean |
enableRecentContactsTimeIndex
Specify whether to enable the time index for the recent contact session
|
boolean |
enableTeamMsgAck
Specify whether to enable the read functionality of group messages.
|
FcsDownloadAuthStrategy |
fcsDownloadAuthStrategy
NOS download authentication policy.
|
long |
fetchServerTimeInterval
The interval from consecutive requests sent to get the server time.
|
java.lang.String |
flutterSdkVersion |
boolean |
improveSDKProcessPriority
Specify whether to increase the priority of the SDK process.
|
java.lang.String |
loginCustomTag
The custom field for login.
|
MessageNotifierCustomization |
messageNotifierCustomization
Custom string for alerts on the notification bar.
|
MixPushConfig |
mixPushConfig
Third-party push service configuration
|
NosTokenSceneConfig |
mNosTokenSceneConfig
Configuration for NOS token scenario
|
NotificationChannelProvider |
notificationChannelProvider
Configure the notification channel.
|
boolean |
notifyStickTopSession
Specify whether the pinned session is synced.
|
boolean |
preloadAttach
Specify whether to automatically preload the attachments of multimedia messages.
|
boolean |
preLoadServers
Preload services.
|
ReconnectStrategy |
reconnectStrategy
To enable this feature, contact technical support
|
boolean |
reducedIM
Specify whether the scene is non-intensive messaging (use with caution)
|
boolean |
reportImLog
Specify whether to enable automatic reporting of IM logs.
|
boolean |
rollbackSQLCipher
SQLCipher encrypted database for rollback
|
java.lang.String |
sdkStorageRootPath
External storage root directory for storing multimedia message files
If the directory is unspecified or unavailable, "external storage root/packageName/nim/" will be used as the root directory. |
SecondTimeoutConfig |
secondTimeoutForSendMessage
The second timeout for sending a message.
|
ServerAddresses |
serverConfig
Configuration for the dedicated server URL
|
boolean |
sessionReadAck
Specify whether to enable sync read messages on multiple devices.
|
boolean |
shouldConsiderRevokedMessageUnreadCount
Specify whether to count recalled messages as unread
The default setting is false.
|
StatusBarNotificationConfig |
statusBarNotificationConfig
The configuration of the notification alert.
|
boolean |
teamNotificationMessageMarkUnread
Specify whether the group notification messages are counted as unread.
|
int |
thumbnailSize
The size of the message thumbnail.
|
boolean |
useAssetServerAddressConfig
Specify whether to check and use the server.conf configuration file for on-premise deployment in the Asset directory.
|
boolean |
useNtServer
Specify whether to enable runtime exception statistics
|
UserInfoProvider |
userInfoProvider
The notification bar displays the user's nickname and avatar.
|
boolean |
useXLog
Use the SDK log mode with better performance.
|
Constructor and Description |
---|
SDKOptions() |
public static final SDKOptions DEFAULT
public java.lang.String appKey
public AuthProvider authProvider
public boolean useAssetServerAddressConfig
public StatusBarNotificationConfig statusBarNotificationConfig
public UserInfoProvider userInfoProvider
public MessageNotifierCustomization messageNotifierCustomization
public java.lang.String sdkStorageRootPath
public java.lang.String databaseEncryptKey
public boolean preloadAttach
public int thumbnailSize
public boolean sessionReadAck
public boolean improveSDKProcessPriority
public ServerAddresses serverConfig
public boolean preLoadServers
public boolean teamNotificationMessageMarkUnread
public boolean useXLog
public boolean animatedImageThumbnailEnabled
The default value is No. By default, NOS take the first frame of an animated image as thumnail. If the value is set to YES, the SDK will download the animated image when requesting a thumbnail.
public boolean asyncInitSDK
The SDK is initialized synchronously by default. If your app does not need to use CommsEase APIs in the beginning, you can use asynchronous loading. This can shorten the response time for executing the SDK initialization function in Application#onCreate. If asynchronous initialization is used and the XXXService interface is called immediately after the SDK initialization function is executed, the calling thread will be blocked (no more than 200ms) until the asynchronous initialization of the SDK is completed (about 60-180ms). Note: No matter whether the SDK is initialized synchronously or asynchronously, calling the XXXServiceObserver interface will not be affected.
public boolean reducedIM
The default value is false, which indicates an intensive messaging scene. Non-intensive messaging scene: The app only uses the messaging capability on demand at times. Automatic login is not required when the application starts. Notification messages and data are not required to be synced in real time. In this case, set the value to true.
In the weak IM scenario, the SDK will not start the push process during the initialization process (persistent connection with the Yunxin server), and will delay the lazy start until the IM manual login process. In non-intensive messaging scenarios, the life cycle of the push process is the same as that of the UI process. When the UI process is killed, the push process will quit without occupying system resources and the connection to the CommsEase server will not be kept. Note: In non-intensive messaging scenarios, do not use automatic login. If automatic login is used, this setting will become invalid automatically.
public boolean checkManifestConfig
public MixPushConfig mixPushConfig
public boolean enableBackOffReconnectStrategy
public ReconnectStrategy reconnectStrategy
public boolean enableLBSOptimize
public boolean enableTeamMsgAck
public boolean shouldConsiderRevokedMessageUnreadCount
public NosTokenSceneConfig mNosTokenSceneConfig
public boolean enableFcs
public FcsDownloadAuthStrategy fcsDownloadAuthStrategy
public boolean useNtServer
public java.lang.String loginCustomTag
public boolean disableAwake
public long fetchServerTimeInterval
public boolean reportImLog
public java.lang.String customPushContentType
public boolean notifyStickTopSession
public boolean enableForegroundService
public int cdnRequestDataInterval
public boolean rollbackSQLCipher
public int coreProcessStartTimeout
public boolean clearTimeTagAtBeginning
public boolean enableDatabaseBackup
public CaptureDeviceInfoConfig captureDeviceInfoConfig
public SecondTimeoutConfig secondTimeoutForSendMessage
public boolean enableRecentContactsTimeIndex
The default value is false. The time index for the recent contact session is disabled. If the time index of recent contact sessions is enabled, it will take less time to query the recent contact sessions but the write operation will spend more time.
public java.lang.String flutterSdkVersion
public NotificationChannelProvider notificationChannelProvider
public boolean enableChatRoomLocation