addEventHandler method
- String identifier,
- ChatContactEventHandler handler
~english Adds the contact event handler. After calling this method, you can handle for new contact event when they arrive.
Param identifier
The custom handler identifier, is used to find the corresponding handler.
Param handler
The handle for contact event. See ChatContactEventHandler.
~end
~chinese 添加联系人事件处理程序。调用此方法后,您可以在新的联系人事件到达时处理它们。
Param identifier
自定义处理程序标识符,用于查找相应的处理程序。
Param handler
事件的句柄. See ChatContactEventHandler.
~end
Implementation
void addEventHandler(
String identifier,
ChatContactEventHandler handler,
) {
_eventHandlesMap[identifier] = handler;
}