NCEngine
Nexconn SDK global singleton entry point.
The starting point for all SDK operations. Provides core methods such as initialization, connection, disconnection, handler registration, and module access.
Externally provides concise APIs while internally isolating implementation details.
// 1. Basic initialization (required parameters only)
NCEngine.initialize(InitParams(context, "your-app-key"))
// 2. Initialization with optional configuration
NCEngine.initialize(InitParams(context, "your-app-key").apply {
logLevel = LogLevel.DEBUG
naviServer = "nav.custom-server.com"
fileServer = "file.custom-server.com"
areaCode = AreaCode.SG
enablePush = true
compressOptions = CompressOptions().apply {
imageWidth = 1280
imageHeight = 1280
imageQuality = 0.82f
maxOriginalImageSize = 300
thumbnailMaxSize = 320
thumbnailMinSize = 120
thumbnailQuality = 0.35f
sightCompressWidth = 720
sightCompressHeight = 1280
}
})
// 3. Connect
NCEngine.connect(ConnectParams("user-token")) { userId, error ->
if (error == null) {
// Connected successfully
}
}
// 4. Disconnect
NCEngine.disconnect()Properties
Functions
Adds a channel status handler.
Adds a connection status handler.
Adds a database upgrade status handler.
Adds a group channel event handler.
Adds a message event handler.
Adds an open channel event handler.
Adds a tag event handler.
Adds a translation event handler.
Adds a user event handler.
Adds a user settings event handler.
Connects to the server.
Disconnects from the server.
Gets application-level configuration settings.
Gets the current connection status.
Returns the currently connected user ID.
Gets the current do-not-disturb time settings.
Translation module (singleton).
User module (singleton).
Returns the SDK version.
Initializes the SDK.
Registers custom message types.
Removes a channel status handler.
Removes a connection status handler.
Removes a database upgrade status handler.
Removes a group channel event handler.
Removes a message event handler.
Removes the do-not-disturb time settings.
Removes an open channel event handler.
Removes a tag event handler.
Removes a translation event handler.
Removes a user event handler.
Removes a user settings event handler.
Sets the do-not-disturb time for message notifications.