agora_chat_SDK
3.8.2
agorajavachatSDK
|
Classes | |
class | EMAContactListenerImpl |
Public Member Functions | |
void | addContact (String username, String reason) throws ChatException |
void | asyncAddContact (final String username, final String reason, final CallBack callback) |
void | deleteContact (String username) throws ChatException |
void | deleteContact (String username, boolean keepConversation) throws ChatException |
void | asyncDeleteContact (final String username, final CallBack callback) |
List< String > | getAllContactsFromServer () throws ChatException |
void | asyncGetAllContactsFromServer (final ValueCallBack< List< String >> callback) |
void | setContactListener (ContactListener contactListener) |
void | removeContactListener (ContactListener contactListener) |
void | addUserToBlackList (String username, boolean both) throws ChatException |
void | asyncAddUserToBlackList (final String username, final boolean both, final CallBack callback) |
void | saveBlackList (List< String > blackList) throws ChatException |
void | asyncSaveBlackList (final List< String > blackList, final CallBack callback) |
void | removeUserFromBlackList (String username) throws ChatException |
void | asyncRemoveUserFromBlackList (final String username, final CallBack callback) |
List< String > | getBlackListUsernames () |
List< String > | getBlackListFromServer () throws ChatException |
void | asyncGetBlackListFromServer (final ValueCallBack< List< String >> callback) |
void | acceptInvitation (String username) throws ChatException |
void | asyncAcceptInvitation (final String username, final CallBack callback) |
void | declineInvitation (String username) throws ChatException |
void | asyncDeclineInvitation (final String username, final CallBack callback) |
List< String > | getContactsFromLocal () throws ChatException |
List< String > | getSelfIdsOnOtherPlatform () throws ChatException |
void | asyncGetSelfIdsOnOtherPlatform (final ValueCallBack< List< String >> callback) |
ContactManager is used to manage friends, including recording, querying, modifying and so on
void io.agora.chat.ContactManager.acceptInvitation | ( | String | username | ) | throws ChatException |
Accept a friend invitation Asynchronously method see asyncAcceptInvitation(String, CallBack)
Synchronization method will block the current thread
username |
void io.agora.chat.ContactManager.addContact | ( | String | username, |
String | reason | ||
) | throws ChatException |
Add a new user Asynchronously method see asyncAddContact(String, String, CallBack)
Synchronization method will block the current thread
username | The user to add |
reason | message for adding contact (optional. use "" or null)) |
ChatException |
void io.agora.chat.ContactManager.addUserToBlackList | ( | String | username, |
boolean | both | ||
) | throws ChatException |
Add a user to blacklist You can send message to the user in blacklist, but you can not receive the message sent by the other Asynchronously method see asyncAddUserToBlackList(String, boolean, CallBack) Add batch blacklist to see saveBlackList(List)
Synchronization method will block the current thread
username | User to be blocked |
both | This parameter is deprecated |
ChatException |
void io.agora.chat.ContactManager.asyncAcceptInvitation | ( | final String | username, |
final CallBack | callback | ||
) |
Accept a friend invitation Synchronization method see acceptInvitation(String)
Asynchronously method
username | |
callback |
void io.agora.chat.ContactManager.asyncAddContact | ( | final String | username, |
final String | reason, | ||
final CallBack | callback | ||
) |
Add a new user Synchronization method see addContact(String, String)
username | user id |
reason | message for adding contact (optional) |
callback |
void io.agora.chat.ContactManager.asyncAddUserToBlackList | ( | final String | username, |
final boolean | both, | ||
final CallBack | callback | ||
) |
Add the user to blacklist You can send message to the user in blacklist, but you can not receive the message sent by the other Synchronization method see addUserToBlackList(String, boolean) Add batch blacklist to see asyncSaveBlackList(List, CallBack)
username | User to be blocked |
both | This parameter is deprecated |
callback |
void io.agora.chat.ContactManager.asyncDeclineInvitation | ( | final String | username, |
final CallBack | callback | ||
) |
Decline a friend invitation Synchronization method see declineInvitation(String)
Asynchronously method
username | |
callback |
void io.agora.chat.ContactManager.asyncDeleteContact | ( | final String | username, |
final CallBack | callback | ||
) |
Delete a contact Synchronization method see deleteContact(String)
username | The user to delete |
callback |
void io.agora.chat.ContactManager.asyncGetAllContactsFromServer | ( | final ValueCallBack< List< String >> | callback | ) |
Get all contacts from the server Synchronization method see getAllContactsFromServer()
callback | Contains list of contacts |
void io.agora.chat.ContactManager.asyncGetBlackListFromServer | ( | final ValueCallBack< List< String >> | callback | ) |
Get blacklist from server Synchronization method see getBlackListFromServer()
callback | Contains black list |
void io.agora.chat.ContactManager.asyncGetSelfIdsOnOtherPlatform | ( | final ValueCallBack< List< String >> | callback | ) |
Get IDs of current user on other platform Synchronization method see getSelfIdsOnOtherPlatform()
Asynchronously method
callback | Contains self id list on other platform |
void io.agora.chat.ContactManager.asyncRemoveUserFromBlackList | ( | final String | username, |
final CallBack | callback | ||
) |
Remove the contact from blacklist Synchronization method see removeUserFromBlackList(String)
username | |
callback |
void io.agora.chat.ContactManager.asyncSaveBlackList | ( | final List< String > | blackList, |
final CallBack | callback | ||
) |
Upload blacklist to server Synchronization method see saveBlackList(List)
blackList | |
callback |
void io.agora.chat.ContactManager.declineInvitation | ( | String | username | ) | throws ChatException |
Decline a friend invitation Asynchronously method see asyncDeclineInvitation(String, CallBack)
Synchronization method will block the current thread
username |
void io.agora.chat.ContactManager.deleteContact | ( | String | username | ) | throws ChatException |
Delete a contact and all the conversations associated
Synchronization method will block the current thread
username |
ChatException |
void io.agora.chat.ContactManager.deleteContact | ( | String | username, |
boolean | keepConversation | ||
) | throws ChatException |
Delete a contact
Synchronization method will block the current thread
username | |
keepConversation | If to keep the associated conversation and messages |
ChatException |
List<String> io.agora.chat.ContactManager.getAllContactsFromServer | ( | ) | throws ChatException |
Get all contacts from the server Asynchronously method see asyncGetAllContactsFromServer(ValueCallBack)
Synchronization method will block the current thread
ChatException |
List<String> io.agora.chat.ContactManager.getBlackListFromServer | ( | ) | throws ChatException |
Get local blacklist Asynchronously method see asyncGetBlackListFromServer(ValueCallBack)
Synchronization method will block the current thread
ChatException |
List<String> io.agora.chat.ContactManager.getBlackListUsernames | ( | ) |
Get local blacklist
List<String> io.agora.chat.ContactManager.getContactsFromLocal | ( | ) | throws ChatException |
Get contacts from local database
ChatException |
List<String> io.agora.chat.ContactManager.getSelfIdsOnOtherPlatform | ( | ) | throws ChatException |
Get IDs of current user on other platform Asynchronously method see asyncGetSelfIdsOnOtherPlatform(ValueCallBack)
Synchronization method will block the current thread
ChatException |
void io.agora.chat.ContactManager.removeContactListener | ( | ContactListener | contactListener | ) |
Remove contact listener Add contact listener calls setContactListener(ContactListener)
void io.agora.chat.ContactManager.removeUserFromBlackList | ( | String | username | ) | throws ChatException |
Remove the contact from blacklist Asynchronously method see asyncRemoveUserFromBlackList(String, CallBack)
Synchronization method will block the current thread
username |
ChatException |
void io.agora.chat.ContactManager.saveBlackList | ( | List< String > | blackList | ) | throws ChatException |
Upload blacklist to server Asynchronously method see asyncSaveBlackList(List, CallBack)
Synchronization method will block the current thread
blackList |
void io.agora.chat.ContactManager.setContactListener | ( | ContactListener | contactListener | ) |
Register new contact listener Call removeContactListener(ContactListener) to remove listener
contactListener |