hyphenate_SDK3.0
3.8.6.1
hyphenate java IM SDK
|
Classes | |
class | EMAContactListenerImpl |
Public Member Functions | |
void | addContact (String username, String reason) throws HyphenateException |
void | aysncAddContact (final String username, final String reason, final EMCallBack callback) |
void | deleteContact (String username) throws HyphenateException |
void | deleteContact (String username, boolean keepConversation) throws HyphenateException |
void | aysncDeleteContact (final String username, final EMCallBack callback) |
List< String > | getAllContactsFromServer () throws HyphenateException |
void | aysncGetAllContactsFromServer (final EMValueCallBack< List< String >> callback) |
void | setContactListener (EMContactListener contactListener) |
void | removeContactListener (EMContactListener contactListener) |
void | addUserToBlackList (String username, boolean both) throws HyphenateException |
void | aysncAddUserToBlackList (final String username, final boolean both, final EMCallBack callback) |
void | saveBlackList (List< String > blackList) throws HyphenateException |
void | asyncSaveBlackList (final List< String > blackList, final EMCallBack callback) |
void | removeUserFromBlackList (String username) throws HyphenateException |
void | aysncRemoveUserFromBlackList (final String username, final EMCallBack callback) |
List< String > | getBlackListUsernames () |
List< String > | getBlackListFromServer () throws HyphenateException |
void | aysncGetBlackListFromServer (final EMValueCallBack< List< String >> callback) |
void | acceptInvitation (String username) throws HyphenateException |
void | asyncAcceptInvitation (final String username, final EMCallBack callback) |
void | declineInvitation (String username) throws HyphenateException |
void | asyncDeclineInvitation (final String username, final EMCallBack callback) |
List< String > | getContactsFromLocal () throws HyphenateException |
List< String > | getSelfIdsOnOtherPlatform () throws HyphenateException |
void | aysncGetSelfIdsOnOtherPlatform (final EMValueCallBack< List< String >> callback) |
EMContactManager is used to manage friends, including recording, querying, modifying and so on
void com.hyphenate.chat.EMContactManager.acceptInvitation | ( | String | username | ) | throws HyphenateException |
Accept a friend invitation Asynchronously method see asyncAcceptInvitation(String, EMCallBack)
Synchronization method will block the current thread
username |
void com.hyphenate.chat.EMContactManager.addContact | ( | String | username, |
String | reason | ||
) | throws HyphenateException |
Add a new user Asynchronously method see aysncAddContact(String, String, EMCallBack)
Synchronization method will block the current thread
username | The user to add |
reason | message for adding contact (optional. use "" or null)) |
HyphenateException |
void com.hyphenate.chat.EMContactManager.addUserToBlackList | ( | String | username, |
boolean | both | ||
) | throws HyphenateException |
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 aysncAddUserToBlackList(String, boolean, EMCallBack) Add batch blacklist to see saveBlackList(List)
Synchronization method will block the current thread
username | User to be blocked |
both | This parameter is deprecated |
HyphenateException |
void com.hyphenate.chat.EMContactManager.asyncAcceptInvitation | ( | final String | username, |
final EMCallBack | callback | ||
) |
Accept a friend invitation Synchronization method see acceptInvitation(String)
Asynchronously method
username | |
callback |
void com.hyphenate.chat.EMContactManager.asyncDeclineInvitation | ( | final String | username, |
final EMCallBack | callback | ||
) |
Decline a friend invitation Synchronization method see declineInvitation(String)
Asynchronously method
username | |
callback |
void com.hyphenate.chat.EMContactManager.asyncSaveBlackList | ( | final List< String > | blackList, |
final EMCallBack | callback | ||
) |
Upload blacklist to server Synchronization method see saveBlackList(List)
blackList | |
callback |
void com.hyphenate.chat.EMContactManager.aysncAddContact | ( | final String | username, |
final String | reason, | ||
final EMCallBack | callback | ||
) |
Add a new user Synchronization method see addContact(String, String)
username | user id |
reason | message for adding contact (optional) |
callback |
void com.hyphenate.chat.EMContactManager.aysncAddUserToBlackList | ( | final String | username, |
final boolean | both, | ||
final EMCallBack | 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, EMCallBack)
username | User to be blocked |
both | This parameter is deprecated |
callback |
void com.hyphenate.chat.EMContactManager.aysncDeleteContact | ( | final String | username, |
final EMCallBack | callback | ||
) |
Delete a contact Synchronization method see deleteContact(String)
username | The user to delete |
callback |
void com.hyphenate.chat.EMContactManager.aysncGetAllContactsFromServer | ( | final EMValueCallBack< List< String >> | callback | ) |
Get all contacts from the server Synchronization method see getAllContactsFromServer()
callback | Contains list of contacts |
void com.hyphenate.chat.EMContactManager.aysncGetBlackListFromServer | ( | final EMValueCallBack< List< String >> | callback | ) |
Get blacklist from server Synchronization method see getBlackListFromServer()
callback | Contains black list |
void com.hyphenate.chat.EMContactManager.aysncGetSelfIdsOnOtherPlatform | ( | final EMValueCallBack< 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 com.hyphenate.chat.EMContactManager.aysncRemoveUserFromBlackList | ( | final String | username, |
final EMCallBack | callback | ||
) |
Remove the contact from blacklist Synchronization method see removeUserFromBlackList(String)
username | |
callback |
void com.hyphenate.chat.EMContactManager.declineInvitation | ( | String | username | ) | throws HyphenateException |
Decline a friend invitation Asynchronously method see asyncDeclineInvitation(String, EMCallBack)
Synchronization method will block the current thread
username |
void com.hyphenate.chat.EMContactManager.deleteContact | ( | String | username | ) | throws HyphenateException |
Delete a contact and all the conversations associated
Synchronization method will block the current thread
username |
HyphenateException |
void com.hyphenate.chat.EMContactManager.deleteContact | ( | String | username, |
boolean | keepConversation | ||
) | throws HyphenateException |
Delete a contact
Synchronization method will block the current thread
username | |
keepConversation | If to keep the associated conversation and messages |
HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getAllContactsFromServer | ( | ) | throws HyphenateException |
Get all contacts from the server Asynchronously method see aysncGetAllContactsFromServer(EMValueCallBack)
Synchronization method will block the current thread
HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getBlackListFromServer | ( | ) | throws HyphenateException |
Get local blacklist Asynchronously method see aysncGetBlackListFromServer(EMValueCallBack)
Synchronization method will block the current thread
HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getBlackListUsernames | ( | ) |
Get local blacklist
List<String> com.hyphenate.chat.EMContactManager.getContactsFromLocal | ( | ) | throws HyphenateException |
Get contacts from local database
HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getSelfIdsOnOtherPlatform | ( | ) | throws HyphenateException |
Get IDs of current user on other platform Asynchronously method see aysncGetSelfIdsOnOtherPlatform(EMValueCallBack)
Synchronization method will block the current thread
HyphenateException |
void com.hyphenate.chat.EMContactManager.removeContactListener | ( | EMContactListener | contactListener | ) |
Remove contact listener Add contact listener calls setContactListener(EMContactListener)
void com.hyphenate.chat.EMContactManager.removeUserFromBlackList | ( | String | username | ) | throws HyphenateException |
Remove the contact from blacklist Asynchronously method see aysncRemoveUserFromBlackList(String, EMCallBack)
Synchronization method will block the current thread
username |
HyphenateException |
void com.hyphenate.chat.EMContactManager.saveBlackList | ( | List< String > | blackList | ) | throws HyphenateException |
Upload blacklist to server Asynchronously method see asyncSaveBlackList(List, EMCallBack)
Synchronization method will block the current thread
blackList |
void com.hyphenate.chat.EMContactManager.setContactListener | ( | EMContactListener | contactListener | ) |
Register new contact listener Call removeContactListener(EMContactListener) to remove listener
contactListener |