addEventHandler method
~english Adds the chat event handler. After calling this method, you can handle for chat event when they arrive.
Param identifier
The custom handler identifier, is used to find the corresponding handler.
Param handler
The handler for chat event. See EMChatEventHandler.
~end
~chinese 添加事件监听。
Param identifier
事件监听对应的 ID。
Param handler
事件监听. 请见 EMChatEventHandler.
~end
Implementation
void addEventHandler(
String identifier,
EMChatEventHandler handler,
) {
_eventHandlesMap[identifier] = handler;
}