EMContactListener

EMContactListener

new EMContactListener()

Source:
EMContactListener constructor.

Methods

onContactAdded(callback) → {void}

Source:
callback function called when contact added.
Parameters:
Name Type Description
callback EMContactListener~onContactAddedCallback 回调函数
Returns:
Type
void

onContactAgreed(callback) → {void}

Source:
called when user invite contact to be friend, and contact has accepted the invitation.
Parameters:
Name Type Description
callback EMContactListener~onContactAgreedCallback 回调函数
Returns:
Type
void

onContactDeleted(callback) → {void}

Source:
called when contact deleted.
Parameters:
Name Type Description
callback EMContactListener~onContactDeletedCallback 回调函数
Returns:
Type
void

onContactInvited(callback) → {void}

Source:
called when user be invited by contact to be friend.
Parameters:
Name Type Description
callback EMContactListener~onContactInvitedCallback 回调函数
Returns:
Type
void

onContactRefused(callback) → {void}

Source:
called when user invite contact to be friend, and contact has declined the invitation.
Parameters:
Name Type Description
callback EMContactListener~onContactRefusedCallback 回调函数
Returns:
Type
void

(inner) onContactAddedCallback(username) → {void}

Source:
Parameters:
Name Type Description
username String 用户ID
Returns:
Type
void

(inner) onContactAgreedCallback(username) → {void}

Source:
Parameters:
Name Type Description
username String 好友ID
Returns:
Type
void

(inner) onContactDeletedCallback(username) → {void}

Source:
Parameters:
Name Type Description
username String 好友ID
Returns:
Type
void

(inner) onContactInvitedCallback(username, reason) → {void}

Source:
Parameters:
Name Type Description
username String 好友ID
reason String 添加原因
Returns:
Type
void

(inner) onContactRefusedCallback(username) → {void}

Source:
Parameters:
Name Type Description
username String 用户ID
Returns:
Type
void