hyphenate_SDK3.0
3.0.1
hyphenatejavaIMSDK
|
Classes | |
interface | AppStateListener |
class | MyConnectionListener |
Public Member Functions | |
void | init (Context context, EMOptions options) |
void | createAccount (String username, String password) throws HyphenateException |
void | login (String id, String password, final EMCallBack callback) |
int | logout (boolean unbindToken) |
void | logout (final boolean unbindToken, final EMCallBack callback) |
void | addConnectionListener (final EMConnectionListener listener) |
void | removeConnectionListener (final EMConnectionListener listener) |
EMGroupManager | groupManager () |
EMChatRoomManager | chatroomManager () |
EMChatManager | chatManager () |
EMContactManager | contactManager () |
EMCallManager | callManager () |
Context | getContext () |
String | getCurrentUser () |
boolean | isLoggedInBefore () |
boolean | isConnected () |
void | setDebugMode (boolean debugMode) |
boolean | updateCurrentUserNick (String nickname) |
void | uploadLog (EMCallBack callback) |
List< EMContact > | getRobotsFromServer () throws HyphenateException |
EMOptions | getOptions () |
EMChatConfig | getChatConfig () |
Static Public Member Functions | |
static EMClient | getInstance () |
Static Public Attributes | |
static final String | TAG = "EMClient" |
static final String | VERSION = "3.1.2" |
IM SDK Client, entrance of SDK, used to login, logout, and get access IM modules, such as
EMChatManager chatManager = EMClient.getInstance().chatManager();
void com.hyphenate.chat.EMClient.addConnectionListener | ( | final EMConnectionListener | listener | ) |
add connection listener
listener |
EMCallManager com.hyphenate.chat.EMClient.callManager | ( | ) |
get call manager
EMChatManager com.hyphenate.chat.EMClient.chatManager | ( | ) |
get chat manager
EMChatRoomManager com.hyphenate.chat.EMClient.chatroomManager | ( | ) |
get chatroom manager
EMContactManager com.hyphenate.chat.EMClient.contactManager | ( | ) |
get contact manager
void com.hyphenate.chat.EMClient.createAccount | ( | String | username, |
String | password | ||
) | throws HyphenateException |
create an IM account on server
username | |
password |
EMChatConfig com.hyphenate.chat.EMClient.getChatConfig | ( | ) |
get EMChatConfig
String com.hyphenate.chat.EMClient.getCurrentUser | ( | ) |
get current logged in user id
List<EMContact> com.hyphenate.chat.EMClient.getRobotsFromServer | ( | ) | throws HyphenateException |
EMGroupManager com.hyphenate.chat.EMClient.groupManager | ( | ) |
get group manager
void com.hyphenate.chat.EMClient.init | ( | Context | context, |
EMOptions | options | ||
) |
initialize the SDK
boolean com.hyphenate.chat.EMClient.isConnected | ( | ) |
check if connected to server.
boolean com.hyphenate.chat.EMClient.isLoggedInBefore | ( | ) |
used to check if user has been logged in before and did not logout if you need check if connected to server, please use isConnected()
if(EMClient.getInstance().isLoggedInBefore()){ // enter main activity }else{ // enter login activity }
void com.hyphenate.chat.EMClient.login | ( | String | id, |
String | password, | ||
final EMCallBack | callback | ||
) |
login to IM server suggest to not login again until last login callback returns
id | unique IM Login ID |
password | password for this IM ID |
callback | login callback |
throw | runtime exception if callback is null or id/password is empty |
int com.hyphenate.chat.EMClient.logout | ( | boolean | unbindToken | ) |
logout
unbindToken | whether unbind token |
void com.hyphenate.chat.EMClient.logout | ( | final boolean | unbindToken, |
final EMCallBack | callback | ||
) |
logout hyphenate IM server synchronously
unbindToken | whether unbind token |
callback | EMCallback |
void com.hyphenate.chat.EMClient.removeConnectionListener | ( | final EMConnectionListener | listener | ) |
remove connection listener
listener |
void com.hyphenate.chat.EMClient.setDebugMode | ( | boolean | debugMode | ) |
SDK will out put debug info if debugMode = true
debugMode |
boolean com.hyphenate.chat.EMClient.updateCurrentUserNick | ( | String | nickname | ) |
This method can be used to set a nickname, the nickname will be used to show for APNS on iOS.
nickname |