|
class | EMAContactListenerImpl |
|
|
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 | 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 | saveBlackList (List< String > blackList) throws HyphenateException |
|
void | asyncSaveBlackList (final List< String > blackList, final EMCallBack 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 > | getSelfIdsOnOtherPlatform () throws HyphenateException |
|
void | aysncGetSelfIdsOnOtherPlatform (final EMValueCallBack< List< String >> callback) |
|
EMContactManager is used to manage Hyphenate friends. if your app has your own friends management, you don't need to use hyphenate contact manager class and please set EMContactManager EMChatOptions.setUseRoster(false);
- See also
- EMContact
void com.hyphenate.chat.EMContactManager.acceptInvitation |
( |
String |
username | ) |
throws HyphenateException |
accept a friend invitation
- Parameters
-
void com.hyphenate.chat.EMContactManager.addContact |
( |
String |
username, |
|
|
String |
reason |
|
) |
| throws HyphenateException |
add a new user
Synchronization method will block the current thread
- Parameters
-
username | The user to add |
reason | message for adding contact (optional. use "" or null)) |
- Exceptions
-
void com.hyphenate.chat.EMContactManager.addUserToBlackList |
( |
String |
username, |
|
|
boolean |
both |
|
) |
| throws HyphenateException |
add a user to blacklist
Synchronization method will block the current thread
- Parameters
-
username | user to be blocked |
both | if true, block the message sending from both side; if false, block receiving message |
- Exceptions
-
void com.hyphenate.chat.EMContactManager.asyncAcceptInvitation |
( |
final String |
username, |
|
|
final EMCallBack |
callback |
|
) |
| |
accept a friend invitation
- Parameters
-
void com.hyphenate.chat.EMContactManager.asyncDeclineInvitation |
( |
final String |
username, |
|
|
final EMCallBack |
callback |
|
) |
| |
decline a friend invitation
- Parameters
-
void com.hyphenate.chat.EMContactManager.asyncSaveBlackList |
( |
final List< String > |
blackList, |
|
|
final EMCallBack |
callback |
|
) |
| |
save blacklist to local database
- Parameters
-
void com.hyphenate.chat.EMContactManager.aysncAddContact |
( |
final String |
username, |
|
|
final String |
reason, |
|
|
final EMCallBack |
callback |
|
) |
| |
add a new user
- Parameters
-
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
- Parameters
-
username | user to be blocked |
both | if true, block the message exchange from both side; if false, block receiving message |
callback | |
void com.hyphenate.chat.EMContactManager.aysncDeleteContact |
( |
final String |
username, |
|
|
final EMCallBack |
callback |
|
) |
| |
Delete a contact
- Parameters
-
username | The user to delete |
callback | |
void com.hyphenate.chat.EMContactManager.aysncGetAllContactsFromServer |
( |
final EMValueCallBack< List< String >> |
callback | ) |
|
Get all contacts from the server
- Parameters
-
callback | contains list of contacts |
void com.hyphenate.chat.EMContactManager.aysncGetBlackListFromServer |
( |
final EMValueCallBack< List< String >> |
callback | ) |
|
get blacklist from server
- Parameters
-
callback | contains black list |
void com.hyphenate.chat.EMContactManager.aysncGetSelfIdsOnOtherPlatform |
( |
final EMValueCallBack< List< String >> |
callback | ) |
|
get IDs of current user on other platform
- Parameters
-
callback | contains self id list on ther platform |
void com.hyphenate.chat.EMContactManager.aysncRemoveUserFromBlackList |
( |
final String |
username, |
|
|
final EMCallBack |
callback |
|
) |
| |
remove the contact from blacklist
- Parameters
-
void com.hyphenate.chat.EMContactManager.declineInvitation |
( |
String |
username | ) |
throws HyphenateException |
decline a friend invitation
- Parameters
-
void com.hyphenate.chat.EMContactManager.deleteContact |
( |
String |
username | ) |
throws HyphenateException |
Delete a contact and all the conversations associated
- Parameters
-
- Exceptions
-
void com.hyphenate.chat.EMContactManager.deleteContact |
( |
String |
username, |
|
|
boolean |
keepConversation |
|
) |
| throws HyphenateException |
Delete a contact
Synchronization method will block the current thread
- Parameters
-
username | |
keepConversation | If to keep the assoicated conversation and messages |
- Exceptions
-
List<String> com.hyphenate.chat.EMContactManager.getAllContactsFromServer |
( |
| ) |
throws HyphenateException |
Get all contacts from the server
Synchronization method will block the current thread
- Returns
- list of contacts
- Exceptions
-
List<String> com.hyphenate.chat.EMContactManager.getBlackListFromServer |
( |
| ) |
throws HyphenateException |
get local blacklist
- Returns
- Exceptions
-
List<String> com.hyphenate.chat.EMContactManager.getBlackListUsernames |
( |
| ) |
|
get local blacklist
- Returns
- List
List<String> com.hyphenate.chat.EMContactManager.getSelfIdsOnOtherPlatform |
( |
| ) |
throws HyphenateException |
get IDs of current user on other platform
- Returns
- Exceptions
-
void com.hyphenate.chat.EMContactManager.removeContactListener |
( |
EMContactListener |
contactListener | ) |
|
void com.hyphenate.chat.EMContactManager.removeUserFromBlackList |
( |
String |
username | ) |
throws HyphenateException |
remove the contact from blacklist
Synchronization method will block the current thread
- Parameters
-
- Exceptions
-
void com.hyphenate.chat.EMContactManager.saveBlackList |
( |
List< String > |
blackList | ) |
throws HyphenateException |
save blacklist to local database
Synchronization method will block the current thread
- Parameters
-
void com.hyphenate.chat.EMContactManager.setContactListener |
( |
EMContactListener |
contactListener | ) |
|
register new contact listener
- Parameters
-
The documentation for this class was generated from the following file:
- hyphenatechatsdk/src/com/hyphenate/chat/EMContactManager.java