hyphenate_SDK3.0  3.1.4
hyphenatejavaIMSDK
Classes | Public Member Functions | List of all members
com.hyphenate.chat.EMContactManager Class Reference

Classes

class  EMAContactListenerImpl
 

Public Member Functions

void finalize () throws Throwable
 
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 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)
 

Detailed Description

EMContactManager is used to manage eaemob friends. if your app has your own friends management, you don't need to use hyphenate contact manager.

See also
EMContact

Member Function Documentation

void com.hyphenate.chat.EMContactManager.acceptInvitation ( String  username) throws HyphenateException

accept the invitation

Parameters
username
void com.hyphenate.chat.EMContactManager.addContact ( String  username,
String  reason 
) throws HyphenateException

add a new hyphenate user

Parameters
username
reasonmessage for adding contact
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.addUserToBlackList ( String  username,
boolean  both 
) throws HyphenateException

add the user to blacklist, who will not

Parameters
username
bothtrue–ban the message sending from both side. false–block receiving message
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.asyncAcceptInvitation ( final String  username,
final EMCallBack  callback 
)

accept the invitation

Parameters
username
void com.hyphenate.chat.EMContactManager.asyncDeclineInvitation ( final String  username,
final EMCallBack  callback 
)

decline the invitation

Parameters
username
void com.hyphenate.chat.EMContactManager.asyncSaveBlackList ( final List< String >  blackList,
final EMCallBack  callback 
)

save black list to local db

Parameters
blackList
void com.hyphenate.chat.EMContactManager.aysncAddContact ( final String  username,
final String  reason,
final EMCallBack  callback 
)

add a new hyphenate user

Parameters
username
reasonmessage for adding contact
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.aysncAddUserToBlackList ( final String  username,
final boolean  both,
final EMCallBack  callback 
)

add the user to blacklist, who will not

Parameters
username
bothtrue–ban the message sending from both side. false–block receiving message
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.aysncDeleteContact ( final String  username,
final EMCallBack  callback 
)

delete a hyphenate user contact

Parameters
username
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.aysncGetAllContactsFromServer ( final EMValueCallBack< List< String >>  callback)

get all contacts

Returns
list of contact
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.aysncGetBlackListFromServer ( final EMValueCallBack< List< String >>  callback)

get local black list

Returns
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.aysncRemoveUserFromBlackList ( final String  username,
final EMCallBack  callback 
)

remove the contact from black list

Parameters
username
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.declineInvitation ( String  username) throws HyphenateException

decline the invitation

Parameters
username
void com.hyphenate.chat.EMContactManager.deleteContact ( String  username) throws HyphenateException

delete a hyphenate user contact

Parameters
username
Exceptions
HyphenateException
List<String> com.hyphenate.chat.EMContactManager.getAllContactsFromServer ( ) throws HyphenateException

get all contacts

Returns
list of contact
Exceptions
HyphenateException
List<String> com.hyphenate.chat.EMContactManager.getBlackListFromServer ( ) throws HyphenateException

get local black list

Returns
Exceptions
HyphenateException
List<String> com.hyphenate.chat.EMContactManager.getBlackListUsernames ( )

get local black list

Returns
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.removeContactListener ( EMContactListener  contactListener)

remove contact listener

void com.hyphenate.chat.EMContactManager.removeUserFromBlackList ( String  username) throws HyphenateException

remove the contact from black list

Parameters
username
Exceptions
HyphenateException
void com.hyphenate.chat.EMContactManager.saveBlackList ( List< String >  blackList) throws HyphenateException

save black list to local db

Parameters
blackList
void com.hyphenate.chat.EMContactManager.setContactListener ( EMContactListener  contactListener)

register new contact listener

Parameters
contactListener

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