addConnectionStatusHandler

public final Unit addConnectionStatusHandler(String identifier, ConnectionStatusHandler handler)

When Connection status changed When, Via ConnectionStatusHandler.onConnectionStateChanged Notify the caller.

Usage Example:

Parameters

identifier

Handle handler unique Identifier, Used for subsequent Remove

NCEngine.addConnectionStatusHandler("CONNECTION_HANDLER_ID") { state ->
when (state) {
Connection paused
Other Status
Remove connection status handler.
}
}

NCEngine.addTagHandler("TAG_HANDLER_ID", object: TagHandler { Add database upgrade status handler.