agora_chat_SDK  3.8.2
agorajavachatSDK
Public Member Functions | List of all members
io.agora.ContactListener Interface Reference

Public Member Functions

void onContactAdded (String username)
 
void onContactDeleted (String username)
 
void onContactInvited (String username, String reason)
 
void onFriendRequestAccepted (String username)
 
void onFriendRequestDeclined (String username)
 

Detailed Description

Contact updates listener Listen for contact changes, including requests to add friends, notifications to delete friends, requests to accept friends, and requests to reject friends

    Register listener:
    ChatClient.getInstance().contactManager().setContactListener(mContactListener);
    Unregister listener:
    ChatClient.getInstance().contactManager().removeContactListener(mContactListener);

Member Function Documentation

void io.agora.ContactListener.onContactAdded ( String  username)

Call back when user is added as a contact by another user

Parameters
usernameNew contact added
void io.agora.ContactListener.onContactDeleted ( String  username)

Call back when user is removed as a contact by another user

Parameters
usernameContact removed
void io.agora.ContactListener.onContactInvited ( String  username,
String  reason 
)

Call back when user receives a friend request

Parameters
usernameUser who initiated the friend request
reasonUser's friend request message
void io.agora.ContactListener.onFriendRequestAccepted ( String  username)

Call back when a friend request is approved

Parameters
username
void io.agora.ContactListener.onFriendRequestDeclined ( String  username)

Call back when a friend request is declined

Parameters
username

The documentation for this interface was generated from the following file: