Class InitParams
-
- All Implemented Interfaces:
public final class InitParamsSDK initialization parameters.
Contains required and optional configuration for SDK initialization. Required parameters are passed via the constructor; optional parameters are set via properties using the builder-style
applyblock.// Basic usage (required parameters only) val params = InitParams(context, "your-app-key") // With optional configuration val params = InitParams(context, "your-app-key").apply { logLevel = LogLevel.DEBUG naviServer = "nav.custom-server.com" areaCode = AreaCode.SG } NCEngine.initialize(params)
-
-
Field Summary
Fields Modifier and Type Field Description private LogLevellogLevelprivate AreaCodeareaCodeprivate StringnaviServerprivate BooleanenablePushprivate BooleanenableSyncEmptyTopConversationprivate CompressOptionscompressOptionsprivate final <Error class: unknown class>contextprivate final StringappKey
-
Constructor Summary
Constructors Constructor Description InitParams(<Error class: unknown class> context, String appKey)
-
Method Summary
Modifier and Type Method Description final LogLevelgetLogLevel()Log level. final UnitsetLogLevel(LogLevel logLevel)Log level. final AreaCodegetAreaCode()Area code. final UnitsetAreaCode(AreaCode areaCode)Area code. final StringgetNaviServer()Custom navigation server URL (for private cloud). final UnitsetNaviServer(String naviServer)Custom navigation server URL (for private cloud). final BooleangetEnablePush()Whether to enable push notifications. final UnitsetEnablePush(Boolean enablePush)Whether to enable push notifications. final BooleangetEnableSyncEmptyTopConversation()Whether to sync empty pinned channels. final UnitsetEnableSyncEmptyTopConversation(Boolean enableSyncEmptyTopConversation)Whether to sync empty pinned channels. final CompressOptionsgetCompressOptions()Media compression options for images and short videos. final UnitsetCompressOptions(CompressOptions compressOptions)Media compression options for images and short videos. final <Error class: unknown class>getContext()final StringgetAppKey()-
-
Method Detail
-
getLogLevel
final LogLevel getLogLevel()
Log level. Default is LogLevel.WARN.
Recommended: LogLevel.DEBUG for development, LogLevel.WARN or LogLevel.ERROR for production.
-
setLogLevel
final Unit setLogLevel(LogLevel logLevel)
Log level. Default is LogLevel.WARN.
Recommended: LogLevel.DEBUG for development, LogLevel.WARN or LogLevel.ERROR for production.
-
getAreaCode
final AreaCode getAreaCode()
Area code. Default is AreaCode.SG.
Select the appropriate area code based on the actual data center location.
-
setAreaCode
final Unit setAreaCode(AreaCode areaCode)
Area code. Default is AreaCode.SG.
Select the appropriate area code based on the actual data center location.
-
getNaviServer
final String getNaviServer()
Custom navigation server URL (for private cloud).
Default is null, which uses the SDK's built-in navigation server. Must be a valid URL if set:
HTTPS:
https://host:portorhttps://host(default port 443)HTTP:
host:portorhost(default port 80)
-
setNaviServer
final Unit setNaviServer(String naviServer)
Custom navigation server URL (for private cloud).
Default is null, which uses the SDK's built-in navigation server. Must be a valid URL if set:
HTTPS:
https://host:portorhttps://host(default port 443)HTTP:
host:portorhost(default port 80)
-
getEnablePush
final Boolean getEnablePush()
Whether to enable push notifications. Default is true.
When set to false, the SDK will not register or handle push-related logic.
-
setEnablePush
final Unit setEnablePush(Boolean enablePush)
Whether to enable push notifications. Default is true.
When set to false, the SDK will not register or handle push-related logic.
-
getEnableSyncEmptyTopConversation
final Boolean getEnableSyncEmptyTopConversation()
Whether to sync empty pinned channels. Default is false.
When set to true, the SDK will sync pinned channels even if they have no messages.
-
setEnableSyncEmptyTopConversation
final Unit setEnableSyncEmptyTopConversation(Boolean enableSyncEmptyTopConversation)
Whether to sync empty pinned channels. Default is false.
When set to true, the SDK will sync pinned channels even if they have no messages.
-
getCompressOptions
final CompressOptions getCompressOptions()
Media compression options for images and short videos.
Controls how images and short videos are compressed before sending. Default is null, which uses built-in SDK defaults.
val params = InitParams(context, "your-app-key").apply { compressOptions = CompressOptions().apply { imageWidth = 1280 imageHeight = 1280 imageQuality = 0.82f maxOriginalImageSize = 300 } }
-
setCompressOptions
final Unit setCompressOptions(CompressOptions compressOptions)
Media compression options for images and short videos.
Controls how images and short videos are compressed before sending. Default is null, which uses built-in SDK defaults.
val params = InitParams(context, "your-app-key").apply { compressOptions = CompressOptions().apply { imageWidth = 1280 imageHeight = 1280 imageQuality = 0.82f maxOriginalImageSize = 300 } }
-
getContext
final <Error class: unknown class> getContext()
-
getAppKey
final String getAppKey()
-
-
-
-