|
class | EMAContactListenerImpl |
|
EMContactManager 用来记录,查询,修改 用户的联系人/好友列表 它主要负责: 登陆后从环信服务器获取联系人列表 添加联系人 删除联系人 刷新联系人列表
如果应用自己管理联系人/好友列表,则不需要使用此 EMContactManager EMChatOptions.setUseRoster(false);
void com.hyphenate.chat.EMContactManager.acceptInvitation |
( |
String |
username | ) |
throws HyphenateException |
void com.hyphenate.chat.EMContactManager.addContact |
( |
String |
username, |
|
|
String |
reason |
|
) |
| throws HyphenateException |
添加联系人
- 参数
-
username | 用户名 |
reason | 原因、理由(optional) |
- 异常
-
void com.hyphenate.chat.EMContactManager.addUserToBlackList |
( |
String |
username, |
|
|
boolean |
both |
|
) |
| throws HyphenateException |
把指定用户加入到黑名单中
- 参数
-
username | 此用户的username |
both | 把用户加入黑民单时,如果是both双方发消息时对方都收不到;如果不是, 则我能给黑名单的中用户发消息,但是对方发给我时我是收不到的 |
- 异常
-
void com.hyphenate.chat.EMContactManager.declineInvitation |
( |
String |
username | ) |
throws HyphenateException |
void com.hyphenate.chat.EMContactManager.deleteContact |
( |
String |
username | ) |
throws HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getAllContactsFromServer |
( |
| ) |
throws HyphenateException |
List<String> com.hyphenate.chat.EMContactManager.getBlackListFromServer |
( |
| ) |
throws HyphenateException |
从服务器获取黑名单中的用户的usernames
- 返回
- 异常
-
List<String> com.hyphenate.chat.EMContactManager.getBlackListUsernames |
( |
| ) |
|
从本地获取黑名单中的用户的usernames
- 返回
- 异常
-
void com.hyphenate.chat.EMContactManager.removeContactListener |
( |
EMContactListener |
contactListener | ) |
|
void com.hyphenate.chat.EMContactManager.removeUserFromBlackList |
( |
String |
username | ) |
throws HyphenateException |
void com.hyphenate.chat.EMContactManager.saveBlackList |
( |
List< String > |
blackList | ) |
throws HyphenateException |
void com.hyphenate.chat.EMContactManager.setContactListener |
( |
EMContactListener |
contactListener | ) |
|
该类的文档由以下文件生成:
- hyphenatechatsdk/src/com/hyphenate/chat/EMContactManager.java