Channel Handler
Channel status change handler.
Listen channel Status (pinned, Do Not Disturb etc.) multi-device Sync Event, and Channel translation strategy Change. When user In Other modified on device channel Status When, Via This Handle handler Notify the current client.
Usage Example:
NCEngine.addChannelHandler("CHANNEL_HANDLER_ID", object : ChannelHandler {
override fun onChannelPinnedSync(channelIdentifier: ChannelIdentifier, pinned: Boolean) {
println("channel ${channelIdentifier.channelId} pinned Status Change: pinned=$pinned")
}
override fun onChannelNoDisturbLevelSync(
channelIdentifier: ChannelIdentifier,
level: NotificationLevel,
) {
}
}
override fun onChannelStatusSyncCompleted(error: NCError?) {
if (error == null) {
}
}
}
override fun onChannelTranslateStrategyChanged(
channelIdentifier: ChannelIdentifier,
translateStrategy: TranslateStrategy,
) {
})
}
})Content copied to clipboard
Functions
Link copied to clipboard
public Unit onChannelNoDisturbLevelSync(ChannelIdentifier channelIdentifier, ChannelNoDisturbLevel level)
Link copied to clipboard
Link copied to clipboard
Channel translation strategy change callback.
Link copied to clipboard
public Unit onChannelTranslateStrategyChanged(ChannelIdentifier channelIdentifier, TranslateStrategy translateStrategy)
Corresponds to internal io.rong.imlib.model.ConversationStatus.TRANSLATION_KEY Status Change.