addEventHandler method

void addEventHandler(
  1. String identifier,
  2. EMContactEventHandler 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 EMContactEventHandler. ~end

~chinese 添加联系人事件处理程序。调用此方法后,您可以在新的联系人事件到达时处理它们。

Param identifier 自定义处理程序标识符,用于查找相应的处理程序。

Param handler 事件的句柄. See EMContactEventHandler. ~end

Implementation

void addEventHandler(
  String identifier,
  EMContactEventHandler handler,
) {
  _eventHandlesMap[identifier] = handler;
}