- acceptApplication(String, String) - 类 中的方法com.easemob.chat.EMGroupManager
-
同意加群申请
accept the application of the user to join this group
- acceptInvitation(String) - 类 中的方法com.easemob.chat.EMChatManager
-
- acceptInvitation(String) - 类 中的方法com.easemob.chat.EMContactManager
-
同意好友请求
accept the invitation sent by the peer
- acceptInvitation(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
接受加入群组邀请
accept the member's inviatation to join the group
- ackMessageRead(String, String) - 类 中的方法com.easemob.chat.EMChatManager
-
发送消息已读回执
send read ack to server
- action - 类 中的变量com.easemob.chat.CmdMessageBody
-
命令
- activityResumed() - 类 中的方法com.easemob.chat.EMChatManager
-
应用从后台回到前台,需要用activityResumed 通知sdk sdk 会reset 系统的消息通知 (notification area)
- addBody(MessageBody) - 类 中的方法com.easemob.chat.EMMessage
-
添加消息体.
- addCallStateChangeListener(EMCallStateChangeListener) - 类 中的方法com.easemob.chat.EMChatManager
-
设置通话状态监听
- addChatRoomChangeListener(EMChatRoomChangeListener) - 类 中的方法com.easemob.chat.EMChatManager
-
注册聊天室事件监听
register chat room change listener
- addCmdProcessor(CmdMsgProcessor) - 类 中的方法com.easemob.chat.EMCmdManager
-
已过时。
- addConnectionListener(ConnectionListener) - 类 中的方法com.easemob.chat.EMChatManager
-
- addConnectionListener(EMConnectionListener) - 类 中的方法com.easemob.chat.EMChatManager
-
add the connection listener to monitor the connection state APP should
not update the UI directly in the callback functions defined in
EMConnectionListener
- addContact(String, String) - 类 中的方法com.easemob.chat.EMContactManager
-
添加联系人
add a new easemob user
- addContactListener(EMContactListener) - 类 中的方法com.easemob.chat.EMContactManager
-
添加联系人变化监听
- addGroupChangeListener(GroupChangeListener) - 类 中的方法com.easemob.chat.EMGroupManager
-
注册群变动事件监听
register the group change listener
- addMember(String) - 类 中的方法com.easemob.chat.EMChatRoom
-
- addMessage(EMMessage) - 类 中的方法com.easemob.chat.EMConversation
-
向对话添加一条消息
- addUsersToGroup(String, String[]) - 类 中的方法com.easemob.chat.EMGroupManager
-
向群组中添加新的成员
add users to the group and only the group owner can do it.
- addUserToBlackList(String, boolean) - 类 中的方法com.easemob.chat.EMContactManager
-
把指定用户加入到黑名单中
add the user to blacklist, who will not
- addVoiceCallStateChangeListener(EMCallStateChangeListener) - 类 中的方法com.easemob.chat.EMChatManager
-
- allowChatroomOwnerLeave(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
允许聊天室owner离开并删除会话记录,意味着owner再不会受到任何消息
enable/disable allowing chat room owner to leave the chat room
- ALREADY_LOGEDIN - 类 中的静态变量com.easemob.EMError
-
连接已经存在,如果之前已经存在个连接并且正在重连,如果再次调用login,会返回此error
- answerCall() - 类 中的方法com.easemob.chat.EMChatManager
-
接听通话
- APPKEY - 类 中的变量com.easemob.chat.EMChatConfig
-
- applyJoinToGroup(String, String) - 类 中的方法com.easemob.chat.EMGroupManager
-
申请加入某个群(用于加入需要验证的公开群)
apply to join the group
- areAllConversationsLoaded() - 类 中的方法com.easemob.chat.EMChatManager
-
- asyncFetchMessage(EMMessage) - 类 中的方法com.easemob.chat.EMChatManager
-
未成功下载的附件,可再次下载
- asyncGetAllPublicGroupsFromServer(EMValueCallBack<List<EMGroupInfo>>) - 类 中的方法com.easemob.chat.EMGroupManager
-
Asynchronously get all public groups from servers
- asyncGetGroupsFromServer(EMValueCallBack<List<EMGroup>>) - 类 中的方法com.easemob.chat.EMGroupManager
-
asynchronously get all groups from servers and sync with local groups
- asyncLoadAllConversations(EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
asynchronously load all conversations with number of messages specificed in setNumberOfMessagesLoaded in
EMChatOptions
for each conversation,20 by defalult
异步获取所有会话列表,每个会话默认加载的消息条目由setNumberOfMessagesLoaded指定,可以参考
EMChatOptions
,默认是20条以保持兼容,建议是1
- ATTR_ACTION - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_ADDRESS - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_EXT - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_FILE_LENGTH - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_FILENAME - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_FROM - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_IMG_HEIGHT - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_IMG_WIDTH - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_LATITUDE - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_LENGTH - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_LOCALURL - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_LONGITUDE - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_MSG - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_PARAM - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_SECRET - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_SIZE - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_THUMB_LOCALURL - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_THUMBNAIL - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_THUMBNAIL_SECRET - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_TO - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- ATTR_TYPE - 类 中的静态变量com.easemob.chat.MessageEncoder
-
notice that the json msg send on the wire is different from json string
saved in local db. for example. image message, the local db will save
localurl attribute, whitch wont send over
- ATTR_URL - 类 中的静态变量com.easemob.chat.MessageEncoder
-
- changedMsg - 类 中的变量com.easemob.EMMessageChangeEventData
-
改变后的EMMessage实例
- changeGroupDescription(String, String) - 类 中的方法com.easemob.chat.EMGroupManager
-
修改群描述
- changeGroupName(String, String) - 类 中的方法com.easemob.chat.EMGroupManager
-
改变群组的名称(群主才能调用此方法)
change the group name and only group owner can do it.
- checkApplication(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
对application的配置检查
- checkInit(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
检查清单文件配置方法
- checkInited() - 类 中的方法com.easemob.chat.EMInstrumentation
-
- checkListener(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
- checkLogin() - 类 中的方法com.easemob.chat.EMInstrumentation
-
- checkMetaData(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
检查是否配置了appkey
- checkoutListener(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
- checkoutSetappinited() - 类 中的方法com.easemob.chat.EMInstrumentation
-
- checkPermission(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
检查权限配置情况
- checkService(Context) - 类 中的方法com.easemob.chat.EMInstrumentation
-
检查 Service 配置情况 主要是检查是否有配置 EMChatService
- clear() - 类 中的方法com.easemob.chat.EMConversation
-
清除对话中的所有消息,只清除内存的,不清除db的消息
- clear() - 类 中的方法com.easemob.chat.EMNotifier
-
已过时。
- clearConversation(String) - 类 中的方法com.easemob.chat.EMChatManager
-
清空和指定用户或者群聊的会话(包括删除本地的聊天记录)
和deleteConversation的区别是: 这个会保留conversation这个对象,
当用户处于聊天页面或者类似上一页是聊天页面,清空消息时务必调用此方法,否则 清空后再来此用户的消息,ui上会有bug
- clone() - 类 中的方法com.easemob.chat.EMMessage
-
- CmdMessageBody - com.easemob.chat中的类
-
创建一个命令消息
CmdMessageBody body = new CmdMessageBody("delete", null);
- CmdMessageBody(String, HashMap<String, String>) - 类 的构造器com.easemob.chat.CmdMessageBody
-
- CmdMessageBody(String) - 类 的构造器com.easemob.chat.CmdMessageBody
-
创建一个命令消息
- CmdMsgProcessor - com.easemob.chat中的接口
-
- com.easemob - 程序包 com.easemob
-
- com.easemob.chat - 程序包 com.easemob.chat
-
- compare(EMContact) - 类 中的方法com.easemob.chat.EMContact
-
- CONNECT_TIMER_OUT - 类 中的静态变量com.easemob.EMError
-
连接服务器超时
- CONNECTION_CLOSED - 类 中的静态变量com.easemob.EMError
-
连接断开
- CONNECTION_CONFLICT - 类 中的静态变量com.easemob.EMError
-
其他设备登陆错误
- CONNECTION_INIT_FAILED - 类 中的静态变量com.easemob.EMError
-
由于登录失败导致的初始化连接失败
- ConnectionListener - com.easemob.chat中的接口
-
- createAccountOnServer(String, String) - 类 中的方法com.easemob.chat.EMChatManager
-
创建新的用户 因为需要网络访问,此方法需要运行在单独的线程或AsyncTask中
create a new easemob user account and this api is only supported when you mark your app as unauthorized user registration in easemob management console
- createFileSendMessage(String, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个普通文件发送消息
- createGroup(String, String, String[]) - 类 中的方法com.easemob.chat.EMGroupManager
-
- createImageSendMessage(String, boolean, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个图片发送消息
- createLocationSendMessage(double, double, String, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个位置发送消息
- createOrUpdateLocalGroup(EMGroup) - 类 中的方法com.easemob.chat.EMGroupManager
-
创建或更新本地的数据库和内存中的群组
create or update local group
- createPrivateGroup(String, String, String[]) - 类 中的方法com.easemob.chat.EMGroupManager
-
在服务器端创建一个私有群.
- createPrivateGroup(String, String, String[], boolean) - 类 中的方法com.easemob.chat.EMGroupManager
-
在服务器端创建一个私有群,可以设置是否允许群成员邀请其他人入群
create a private group and specify if that's alowed to invite other users t join the group or not.
- createPrivateGroup(String, String, String[], boolean, int) - 类 中的方法com.easemob.chat.EMGroupManager
-
在服务器端创建一个私有群,可以设置是否允许群成员邀请其他人入群
create a private group and specify if that's alowed to invite other users t join the group or not and the max members
- createPublicGroup(String, String, String[], boolean) - 类 中的方法com.easemob.chat.EMGroupManager
-
在服务器端创建一个公开群,创建成功的群组,能被用户搜索到以及加入进来
create a public group and the group can be discoverred by any user and the max members by default is 200
- createPublicGroup(String, String, String[], boolean, int) - 类 中的方法com.easemob.chat.EMGroupManager
-
在服务器端创建一个公开群,创建成功的群组,能被用户搜索到以及加入进来
create a public group and the group can be discoverred by any user and specify the max users
- createReceiveMessage(EMMessage.Type) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个接收消息
create a new recv message
- createSendMessage(EMMessage.Type) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个发送消息
create a new send message
- createTxtSendMessage(String, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个文本发送消息
- createVideoSendMessage(String, String, int, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个视频发送消息
- createVoiceSendMessage(String, int, String) - 类 中的静态方法com.easemob.chat.EMMessage
-
创建一个语言发送消息
- CREATOR - 类 中的静态变量com.easemob.chat.CmdMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.EMContact
-
- CREATOR - 类 中的静态变量com.easemob.chat.EMMessage
-
- CREATOR - 类 中的静态变量com.easemob.chat.ImageMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.LocationMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.NormalFileMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.TextMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.VideoMessageBody
-
- CREATOR - 类 中的静态变量com.easemob.chat.VoiceMessageBody
-
- EMCallBack - com.easemob中的接口
-
The general callback interface
The errors defined in this callback is moved to
EMError
, so please stop using those errors.
- EMCallStateChangeListener - com.easemob.chat中的接口
-
- EMCallStateChangeListener.CallError - com.easemob.chat中的枚举
-
define call error
in most of cases, the error was set in disconnected state
- EMCallStateChangeListener.CallState - com.easemob.chat中的枚举
-
define the call state
- EMChangeEventData<T> - com.easemob中的类
-
通用event change 数据定义
只提供改变前的数据,和改变后的数据
- EMChangeEventData() - 类 的构造器com.easemob.EMChangeEventData
-
- EMChat - com.easemob.chat中的类
-
此类用来初始化环信和配置各种初始化参数,一般情况下都会在Application:onCreate里初始化一次即可
Easemob IM initializer, which is used to initialize the easmob IM SDK and config the sdk options
EMChat.getInstance().init(application_context);
- EMChat() - 类 的构造器com.easemob.chat.EMChat
-
- EMChatConfig - com.easemob.chat中的类
-
EMChatConfig 负责 初始化SDK的时候,读入应用 manifest 文件里面的相关设置。
- EMChatConfig.EMEnvMode - com.easemob.chat中的枚举
-
运行环境模式
- EMChatConfig.EMSDKMode - com.easemob.chat中的枚举
-
SDK 模式
主要用来处理长连接和短连接,一般客服模式短连接即可,否者会极大浪费后台资源
- EMChatDB - com.easemob.chat中的类
-
- EMChatManager - com.easemob.chat中的类
-
环信sdk 的主要接口 应用启动的时候初始化 sdk
public final class YouAppClass extends Application {
public void onCreate() {
super.onCreate();
// 初始化 chat sdk
EMChat.getInstance().init(this.getApplicationContext());
}
}
发送一条文本消息:
EMMessage msg = new EMMessage(EMMessage.Type.TXT);
msg.setReceipt("test_user1");
TextMessageBody body = new TextMessageBody("hello from easemob");
msg.addBody(body);
EMChatManager.getInstance().sendMessage(msg);
从接收消息通过注册broadcast receiver实现::
BroadcastReceiver msgReceiver = new BroadcastReceiver(){
public void onReceive(Context context, Intent intent) {
String msgId = intent.getStringExtra("msgid");
EMMessage message = EMChatManager.getInstance().getMessage(msgId);
Log.d("main", "new message id:" + msgId + " from:" + message.getFrom()
+ " type:" + message.getType() + " body:" + message.getBody());
switch (message.getType()) {
case TXT:
TextMessageBody txtBody = (TextMessageBody)message.getBody();
Log.d("text message from:" + message.getFrom() + " text:" + txtBody.getMessage() + " \n\r");
break;
case IMAGE:
ImageMessageBody imgBody = (ImageMessageBody)message.getBody();
Log.d("img message from:" + message.getFrom() + " thumbnail:" + imgBody.getThumbnailUrl()
+ " remoteurl:" + imgBody.getRemoteUrl()+ " \n\r");
break;
case VOICE:
VoiceMessageBody voiceBody = (VoiceMessageBody)message.getBody();
Log.d("voice message from:" + message.getFrom() + " length:" + voiceBody.getLength()
+ " remoteurl:" + voiceBody.getRemoteUrl()+ " \n\r");
break;
case LOCATION:
LocationMessageBody locationBody = (LocationMessageBody)message.getBody();
Log.d("location message from:" + message.getFrom() + " address:" + locationBody.getAddress() +" \n\r");
break;
}
};
IntentFilter intentFilter = new IntentFilter(EMChatManager.getInstance().getNewMessageBroadcastAction());
registerReceiver(msgReceiver, intentFilter);
应用程序可以通过EMChatOptions 来配置聊天的各种选项
- EMChatOptions - com.easemob.chat中的类
-
EMChatOptions 提供环信sdk聊天相关的设置。
- EMChatOptions() - 类 的构造器com.easemob.chat.EMChatOptions
-
- EMChatRoom - com.easemob.chat中的类
-
- EMChatRoom() - 类 的构造器com.easemob.chat.EMChatRoom
-
- EMChatRoom(String) - 类 的构造器com.easemob.chat.EMChatRoom
-
- EMChatRoom(String, String) - 类 的构造器com.easemob.chat.EMChatRoom
-
- EMChatRoomChangeListener - com.easemob中的接口
-
chat room change listener
- EMChatService - com.easemob.chat中的类
-
- EMChatService() - 类 的构造器com.easemob.chat.EMChatService
-
- EMChatService.LocalBinder - com.easemob.chat中的类
-
- EMCloudOperationCallback - com.easemob.chat中的接口
-
此类不对外开放
- EMCmdManager - com.easemob.chat中的类
-
已过时。
- EMCmdMessageBody - com.easemob.chat中的类
-
- EMCmdMessageBody(String) - 类 的构造器com.easemob.chat.EMCmdMessageBody
-
- EMConnectionListener - com.easemob中的接口
-
Define the connection listener
We only support 2 states : connected, disconnected
And please be careful: APP should not update UI in this api since this is called from worker thread
or heavy work which will block other listener to handle this connection event
And Please see
EMError
for detailed error description on disconnected
- EMContact - com.easemob.chat中的类
-
EMContact 代表联系人 对象,这是个基类 。
- EMContact(String, String) - 类 的构造器com.easemob.chat.EMContact
-
- EMContact(String) - 类 的构造器com.easemob.chat.EMContact
-
generate EMConcact object from app username
- EMContactListener - com.easemob.chat中的接口
-
contact change listener. if your app will use our contact management, you have to use this listener by implementing it to receive any change of contact
- EMContactManager - com.easemob.chat中的类
-
EMContactManager 用来记录,查询,修改 用户的联系人/好友列表 它主要负责: 登陆后从环信服务器获取联系人列表
添加联系人 删除联系人 刷新联系人列表
如果应用自己管理联系人/好友列表,则不需要使用此 EMContactManager EMChatOptions.setUseRoster(false);
EMContactManager is used to manage eaemob friends. if your app has your own friends management, you don't need to use easemob contact manager.
- EMConversation - com.easemob.chat中的类
-
EMConversation 代表和一个用户的对话,包含发送和接收的消息
下面的示例会取得对话中未读的消息数:
EMConversation conversation = EMChatManager.getInstance().getConversation("user1");
int unread = conversation.getUnreadMsgCount();
- EMConversation(String) - 类 的构造器com.easemob.chat.EMConversation
-
创建一个对话
- EMConversation(String, boolean) - 类 的构造器com.easemob.chat.EMConversation
-
创建一个会话
- EMConversation(String, List<EMMessage>, EMConversation.EMConversationType, Long) - 类 的构造器com.easemob.chat.EMConversation
-
- EMConversation.EMConversationType - com.easemob.chat中的枚举
-
define the conversation type
- EMCursorResult<T> - com.easemob.chat中的类
-
分批获取时返回此对象,包含用于下次获取数据的cursor(如果后面还有更多数据)
以及传入的泛型对象的相应list
- EMCursorResult() - 类 的构造器com.easemob.chat.EMCursorResult
-
- EMCustomerServiceConfiguration - com.easemob.chat中的类
-
- EMCustomerServiceConfiguration() - 类 的构造器com.easemob.chat.EMCustomerServiceConfiguration
-
- EMEncryptUtils - com.easemob.chat中的类
-
- EMEncryptUtils() - 类 的构造器com.easemob.chat.EMEncryptUtils
-
- EMError - com.easemob中的类
-
The error list
- EMError() - 类 的构造器com.easemob.EMError
-
- EMEventListener - com.easemob中的接口
-
从2.1.8开始环信SDK逐步会用回调的方式替换broadcast通知,以便开发者更容易定制自己的实现例如免打扰功能
EMEventListener is used to receive any easemob event releated to message
- EMGCMBroadcastReceiver - com.easemob.chat中的类
-
- EMGCMBroadcastReceiver() - 类 的构造器com.easemob.chat.EMGCMBroadcastReceiver
-
- EMGCMListenerService - com.easemob.chat中的类
-
- EMGCMListenerService() - 类 的构造器com.easemob.chat.EMGCMListenerService
-
- EMGroup - com.easemob.chat中的类
-
- EMGroup(String) - 类 的构造器com.easemob.chat.EMGroup
-
- EMGroupChangeListener - com.easemob中的接口
-
- EMGroupInfo - com.easemob.chat中的类
-
- EMGroupInfo(String, String) - 类 的构造器com.easemob.chat.EMGroupInfo
-
- EMGroupManager - com.easemob.chat中的类
-
群组管理
group manager is used to manage all the groups related operations, create, delete, group and invite members, block memebers, etc..
- EMHuaweiPushReceiver - com.easemob.chat中的类
-
- EMHuaweiPushReceiver() - 类 的构造器com.easemob.chat.EMHuaweiPushReceiver
-
- EMInstrumentation - com.easemob.chat中的类
-
- EMInstrumentation() - 类 的构造器com.easemob.chat.EMInstrumentation
-
- EMJobService - com.easemob.chat中的类
-
Created by wei on 2016/9/2.
- EMJobService() - 类 的构造器com.easemob.chat.EMJobService
-
- EMKeywordSearchInfo - com.easemob.chat中的类
-
This class is used to store the brief conversation information for keyword search
- EMKeywordSearchInfo() - 类 的构造器com.easemob.chat.EMKeywordSearchInfo
-
- EMMessage - com.easemob.chat中的类
-
代表一条发送或接收到的消息
represent a sent/recv message
构造一条文本发送消息
construct a new send text message
EMMessage msg = EMMessage.createSendMessage(EMMessage.Type.TXT);
msg.setReceipt("user1");
TextMessageBody body = new TextMessageBody("hello from easemob sdk");
msg.addBody(body);
构造一条图片消息
construct a new recv text message
EMMessage msg = EMMessage.createSendMessage(EMMessage.Type.IMAGE);
msg.setReceipt("user1");
ImageMessageBody body = new ImageMessageBody(imageFileUrl);
msg.addBody(body);
- EMMessage.ChatType - com.easemob.chat中的枚举
-
聊天类型:单聊,群聊,聊天室
chat type : private chat, group chat, chat room
- EMMessage.Direct - com.easemob.chat中的枚举
-
消息的方向类型:区分是发送消息还是接收到的消息
message direction
- EMMessage.Status - com.easemob.chat中的枚举
-
消息的发送/接收状态:成功,失败,发送/接收过程中,创建成功待发送
message status
- EMMessage.Type - com.easemob.chat中的枚举
-
消息类型:文本,图片,视频,位置,语音,文件
message type:
- EMMessageChangeEventData - com.easemob中的类
-
消息改变通知所提供的数据
message change even data
- EMMessageChangeEventData() - 类 的构造器com.easemob.EMMessageChangeEventData
-
- EMMessageChangeEventData.EMChangeSource - com.easemob中的枚举
-
改变源
change source
- EMMessageDispatcher - com.easemob.chat中的类
-
just a simple message dispatcher which is responsible for dispatching the sending and receiving msg runnable
- EMMipushReceiver - com.easemob.chat中的类
-
- EMMipushReceiver() - 类 的构造器com.easemob.chat.EMMipushReceiver
-
- EMMonitor - com.easemob.chat中的类
-
- EMMonitorReceiver - com.easemob.chat中的类
-
- EMMonitorReceiver() - 类 的构造器com.easemob.chat.EMMonitorReceiver
-
- EMNotifier - com.easemob.chat中的类
-
- EMNotifierEvent - com.easemob中的类
-
此类定义SDK的回调事件
此类包含2个重要信息 1.
- EMNotifierEvent() - 类 的构造器com.easemob.EMNotifierEvent
-
- EMNotifierEvent.Event - com.easemob中的枚举
-
- EMPageResult<T> - com.easemob.chat中的类
-
分页获取时返回此对象,包含当前请求的参数:pagenum 和 pagesize(如果后面还有更多数据)
以及传入的泛型对象的相应list
- EMPageResult() - 类 的构造器com.easemob.chat.EMPageResult
-
- EMValueCallBack<T> - com.easemob中的接口
-
带参数返回值得回调
easemob callback with value
- EMVideoCallHelper - com.easemob.chat中的类
-
- EMVideoCallHelper.EMVideoOrientation - com.easemob.chat中的枚举
-
- enalbeDNSConfig(boolean) - 类 中的方法com.easemob.chat.EMChat
-
不对外开放,仅用来测试
for testing purpose, is not opened for APPS
- encrypt(byte[], String) - 接口 中的方法com.easemob.chat.EncryptProvider
-
加密函数
- encryptFile(String, String) - 类 中的静态方法com.easemob.chat.EMEncryptUtils
-
create a temp encrypted file
- ENCRYPTION_ERROR - 类 中的静态变量com.easemob.EMError
-
数据加密传输错误
- EncryptProvider - com.easemob.chat中的接口
-
加解密接口类
SDK 内置了基于AES的加密算法
用户可以实现EncryptProvider,提供自己的加解密算法,对消息和附件进行加密/解密
设置消息加密:
EaseMobChat.getInstance().setEncryptionMode(true);
EaseMobChat.getInstance().setEncryptProvider(new MyEncryptProvider());
发送消息时:如果设置了消息加密系统会在发送消息前,调用用户设置的EncryptProvider来加密
收到消息时:如果是加密消息,SDK 会调用用户设置的 EncryptProvider来解密
- endCall() - 类 中的方法com.easemob.chat.EMChatManager
-
挂断通话
- ERROR_EXCEPTION - 接口 中的静态变量com.easemob.EMCallBack
-
- ERROR_EXCEPTION - 类 中的静态变量com.easemob.EMError
-
异常,为了和以前的error兼容
- ERROR_EXCEPTION_CONNECT_TIMER_OUT - 接口 中的静态变量com.easemob.EMCallBack
-
连接服务器超时
- ERROR_EXCEPTION_DNS_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
DNS 错误
- ERROR_EXCEPTION_ENCRYPTION_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
数据加密传输错误
- ERROR_EXCEPTION_FILE_NOT_FOUND - 接口 中的静态变量com.easemob.EMCallBack
-
文件不存在异常
- ERROR_EXCEPTION_INVALID_CERTIFICATE - 接口 中的静态变量com.easemob.EMCallBack
-
证书认证错误
- ERROR_EXCEPTION_INVALID_FILE - 接口 中的静态变量com.easemob.EMCallBack
-
无效文件异常,一般文件为0字节时为无效
- ERROR_EXCEPTION_INVALID_KEYSTORE - 接口 中的静态变量com.easemob.EMCallBack
-
密钥认证错误
- ERROR_EXCEPTION_INVALID_PASSWORD_USERNAME - 接口 中的静态变量com.easemob.EMCallBack
-
用户名或密码错误
- ERROR_EXCEPTION_IO_EXCEPTION - 接口 中的静态变量com.easemob.EMCallBack
-
数据读取错误
- ERROR_EXCEPTION_LOGOFFINPROGRESS_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
- ERROR_EXCEPTION_NO_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
无任何异常
- ERROR_EXCEPTION_NONETWORK_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
网络不可用
- ERROR_EXCEPTION_UNABLE_CONNECT_TO_SERVER - 接口 中的静态变量com.easemob.EMCallBack
-
无法连接到服务器
- ERROR_EXCEPTION_UNKNOWN_SERVER_ERROR - 接口 中的静态变量com.easemob.EMCallBack
-
无法识别服务器返回值
- ERROR_FILE_NOT_FOUND - 接口 中的静态变量com.easemob.EMCallBack
-
- ERROR_FILE_NOT_FOUND - 类 中的静态变量com.easemob.EMError
-
filt not found
- ERROR_SEND - 接口 中的静态变量com.easemob.EMCallBack
-
- ERROR_SEND - 类 中的静态变量com.easemob.EMError
-
send message error
- ERROR_SOCKET_TIME_OUT - 类 中的静态变量com.easemob.EMError
-
socket timerout error
- ERROR_UNBIND_DEVICETOKEN - 类 中的静态变量com.easemob.EMError
-
unbind devicetoken failed
- exitAndDeleteGroup(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
解散群组 (只有群组的创建者才能调用此函数来删除)
dismiss the group and only the group owner can do it.
- exitFromGroup(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
当前登录用户退出群组
the member exit the group
- GENERAL_ERROR - 类 中的静态变量com.easemob.EMError
-
general error
- getAcceptInvitationAlways() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取是否自动接受加好友邀请。
- getAccessToken() - 类 中的方法com.easemob.chat.EMChatManager
-
获取身份认证权限 在上传下载附件(语音,图片,文件等)时必须添加到请求header中 当出现任何异常时将返回null,
可通过判断是否为null来检测是否有问题 如果为null,在打开EMLog日志时,是可以看到异常原因。
- getAckMessageBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getAction() - 接口 中的方法com.easemob.chat.CmdMsgProcessor
-
get the action the cmd processor will process
- getAddress() - 类 中的方法com.easemob.chat.LocationMessageBody
-
获取地址
- getAgents() - 类 中的方法com.easemob.chat.EMCustomerServiceConfiguration
-
获取客服环信ID列表
- getAllChatRooms() - 类 中的方法com.easemob.chat.EMChatManager
-
从内存中获取所有的聊天室
非耗时操作
get all the chat rooms in the cache
- getAllConversations() - 类 中的方法com.easemob.chat.EMChatManager
-
获取内存中所有会话
和loadAllConversations区别就是loadAllConversations是从本地数据库加载所有的会话到内存,所以app在使用getAllConversations之前,一定要先调用loadAllConversations
以确保会话都被加载到内存中,不过loadAllConversations调用一次即可
get all conversations
compared with loadAllConversations, loadAllConversations will load conversations from db to memory and getAllConversations will get all conversations from memmory
therefore, you should call api loadAllConversations and getAllConversations
- getAllGroups() - 类 中的方法com.easemob.chat.EMGroupManager
-
获取当前(内存)用户的所有群组
get all grops from cache
- getAllMessages() - 类 中的方法com.easemob.chat.EMConversation
-
获取此conversation当前内存所有的message
- getAllMsgCount() - 类 中的方法com.easemob.chat.EMConversation
-
获取本地存储会话的全部消息数目
- getAllPublicGroupsFromServer() - 类 中的方法com.easemob.chat.EMGroupManager
-
- getAppContext() - 类 中的方法com.easemob.chat.EMChat
-
获取全局上下文
get app context
- getAppkey() - 类 中的方法com.easemob.chat.EMChat
-
返回appkey
get appkey
- getAutoConversationsLoaded() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getBlackListUsernames() - 类 中的方法com.easemob.chat.EMContactManager
-
从本地获取黑名单中的用户的usernames
get local black list
- getBlackListUsernamesFromServer() - 类 中的方法com.easemob.chat.EMContactManager
-
从服务器获取黑名单中的用户的usernames
get black list from server
- getBlockedUsers(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
获取群组的黑名单用户列表
(只有群主才能调用此函数)
get the list of blocked users and only the group owner can do it.
- getBody() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息的body
get message body
- getBooleanAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 boolean 类型扩展属性
- getBooleanAttribute(String, boolean) - 类 中的方法com.easemob.chat.EMMessage
-
获取 boolean 类型扩展属性
- getChatOptions() - 类 中的方法com.easemob.chat.EMChatManager
-
获取聊天sdk 的相关参数,配置
get options
- getChatRoom(String) - 类 中的方法com.easemob.chat.EMChatManager
-
从内存中获取聊天室
非耗时操作
get the chat room in the cache
- getChatType() - 类 中的方法com.easemob.chat.EMMessage
-
获取聊天类型
- getCmdMessageBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getContactChangeAction() - 类 中的静态方法com.easemob.chat.EMContactManager
-
chat sdk will broadcast contact change intent when contact changes user
app can register intent receiver for this intent to update UI accordingly
- getContactInviteEventBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getContactUserNames() - 类 中的方法com.easemob.chat.EMChatManager
-
获取所有联系人的用户名列表
- getContactUserNames() - 类 中的方法com.easemob.chat.EMContactManager
-
获取所有联系人的用户名列表
get all contacts
- getConversation(String) - 类 中的方法com.easemob.chat.EMChatManager
-
获取和指定用户或者群组的对话
get conversation through user id or group id
typically you don't need to pass any type of conversation to get the conversation if you don't work on the chatroom
otherwise you should pass by the conversation type getConversationByType(String username, EMConversationType type)
- getConversation(String, boolean) - 类 中的方法com.easemob.chat.EMChatManager
-
- getConversationByType(String, EMConversation.EMConversationType) - 类 中的方法com.easemob.chat.EMChatManager
-
please use this api to get conversation in case you want to get conversation for chatroom type
- getConversationsByType(EMConversation.EMConversationType) - 类 中的方法com.easemob.chat.EMChatManager
-
get list of conversations by conversation type
- getConversationsUnread() - 类 中的方法com.easemob.chat.EMChatDB
-
已过时。
- getConversationsUnread() - 类 中的方法com.easemob.chat.EMChatManager
-
获取有未读数的会话
get list of user id of group id which have the unread messages
- getCount() - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
return the total count of matched messages which contain the keyword
- getCurrentUser() - 类 中的方法com.easemob.chat.EMChatManager
-
获取当前登录用户的用户名
get current logged in user id
- getCursor() - 类 中的方法com.easemob.chat.EMCursorResult
-
- getData() - 类 中的方法com.easemob.EMNotifierEvent
-
- getDeliveryAckMessageBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getDomain() - 类 中的方法com.easemob.chat.EMChatConfig
-
获取chatserver 的domain name
- getEid() - 类 中的方法com.easemob.chat.EMContact
-
- getEncryptProvider() - 类 中的方法com.easemob.chat.EMChatManager
-
获取EncryptProvider 如果未设置, 将返回sdk 内置的encrypt provider
- getError() - 类 中的方法com.easemob.chat.EMMessage
-
返回发送消息失败后的error
- getEvent() - 类 中的方法com.easemob.EMNotifierEvent
-
- getExtField() - 类 中的方法com.easemob.chat.EMConversation
-
获取用户可以自行定义会话扩展字段
该字段只保存在本地,不进行网络同步
- getFileName() - 类 中的方法com.easemob.chat.FileMessageBody
-
获得文件名
- getFileSize() - 类 中的方法com.easemob.chat.NormalFileMessageBody
-
- getFrom() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息发送者的用户名
get sender name
- getGroup(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
根据群组ID,获得群组对象
get local group from cache by group id
- getGroupFromServer(String) - 类 中的方法com.easemob.chat.EMGroupManager
-
从服务器获取群组的详细信息和最新的成员列表(获取完后不会自动存入本地)
get the group from the server but did not upate local group. but you can update the local group by using
api createOrUpdateLocalGroup
- getGroupId() - 类 中的方法com.easemob.chat.EMGroup
-
获取群ID
- getGroupId() - 类 中的方法com.easemob.chat.EMGroupInfo
-
- getGroupName() - 类 中的方法com.easemob.chat.EMGroup
-
获取群名称
- getGroupName() - 类 中的方法com.easemob.chat.EMGroupInfo
-
- getGroupsFromServer() - 类 中的方法com.easemob.chat.EMGroupManager
-
- getGroupsOfNotificationDisabled() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getHeight() - 类 中的方法com.easemob.chat.ImageMessageBody
-
- getIncomingCallBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
获取音视频通话广播的action
- getIncomingVoiceCallBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getInstance() - 类 中的静态方法com.easemob.chat.EMChat
-
get global EMChat instance
- getInstance() - 类 中的静态方法com.easemob.chat.EMChatConfig
-
- getInstance() - 类 中的静态方法com.easemob.chat.EMChatDB
-
已过时。
- getInstance() - 类 中的静态方法com.easemob.chat.EMChatManager
-
获取EMChatManager全局单例
get global EMChatManager instance
- getInstance() - 类 中的静态方法com.easemob.chat.EMCmdManager
-
已过时。
- getInstance() - 类 中的静态方法com.easemob.chat.EMContactManager
-
获取EMContactManager 的实例
- getInstance() - 类 中的静态方法com.easemob.chat.EMGroupManager
-
- getInstance() - 类 中的静态方法com.easemob.chat.EMInstrumentation
-
获取单例类的实例
- getInstance(Context) - 类 中的静态方法com.easemob.chat.EMNotifier
-
已过时。
- getInstance() - 类 中的静态方法com.easemob.chat.EMVideoCallHelper
-
get global EMVideoCallHelper instance
- getIntAttribute(String, int) - 类 中的方法com.easemob.chat.EMMessage
-
获取 int 类型扩展属性
- getIntAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 int 类型扩展属性
- getIsGroup() - 类 中的方法com.easemob.chat.EMConversation
-
- getJoinedGroupsFromServer() - 类 中的方法com.easemob.chat.EMGroupManager
-
- getJSONArrayAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 JSONArray 类型扩展属性
- getJSONMsg(EMMessage, boolean) - 类 中的静态方法com.easemob.chat.MessageEncoder
-
- getJSONObjectAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 JSONObject 类型扩展属性
- getKeywordInfoList(String) - 类 中的方法com.easemob.chat.EMChatManager
-
全局搜索聊天内容,如果一个会话有多条,会通过数字提示
get the keyword info list by keyword
- getLastMessage() - 类 中的方法com.easemob.chat.EMConversation
-
获取队列中的最后一条消息 (此操作不会改变未读消息计数)
- getLatitude() - 类 中的方法com.easemob.chat.LocationMessageBody
-
获取纬度
- getLength() - 类 中的方法com.easemob.chat.VideoMessageBody
-
获得视频文件的长度(单位为秒)
- getLength() - 类 中的方法com.easemob.chat.VoiceMessageBody
-
获得语音文件的长度 (单位是秒)
- getLocalBitrate() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
发送视频比特率,单位为kbps
- getLocalThumb() - 类 中的方法com.easemob.chat.VideoMessageBody
-
获取本地Video缩略图
- getLocalUrl() - 类 中的方法com.easemob.chat.FileMessageBody
-
本地图片,语音等文件的url
- getLongAttribute(String, long) - 类 中的方法com.easemob.chat.EMMessage
-
获取 long 类型扩展属性
- getLongAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 long 类型扩展属性
- getLongitude() - 类 中的方法com.easemob.chat.LocationMessageBody
-
获取经度
- getMessage(String) - 类 中的方法com.easemob.chat.EMChatManager
-
获取指定ID 的消息对象
get message through message id
- getMessage(int) - 类 中的方法com.easemob.chat.EMConversation
-
获取对话指定位置的消息
- getMessage(int, boolean) - 类 中的方法com.easemob.chat.EMConversation
-
获取对话指定位置的消息
- getMessage(String) - 类 中的方法com.easemob.chat.EMConversation
-
根据msgid获取消息
消息会被自动标记为已读
- getMessage(String, boolean) - 类 中的方法com.easemob.chat.EMConversation
-
根据msgid获取消息
- getMessage() - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
return the latest matched message which contain the keyword
- getMessage() - 类 中的方法com.easemob.chat.TextMessageBody
-
获取文本消息内容
- getMessagePosition(EMMessage) - 类 中的方法com.easemob.chat.EMConversation
-
获取message的position
- getMessagesByKeyword(String, String, int, String) - 类 中的方法com.easemob.chat.EMChatManager
-
根据某用户搜索得到详细的消息列表
get message list in page by keyword for specific user
- getMessagesByMsgType(EMMessage.Type, EMMessage.ChatType, String, String, int) - 类 中的方法com.easemob.chat.EMChatManager
-
返回单聊(群聊)下的某一类型的消息列表
- getMonitorDB() - 类 中的方法com.easemob.chat.EMMonitor
-
- getMsgCount() - 类 中的方法com.easemob.chat.EMConversation
-
获取对话中已经加载到内存中消息的数目
- getMsgFromJson(String) - 类 中的静态方法com.easemob.chat.MessageEncoder
-
create message object from json string
- getMsgId() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息的id'=
get message id
- getMsgTime() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息的时间
get message time stamp
- getNewMessageBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getNewValue() - 类 中的方法com.easemob.EMChangeEventData
-
- getNick() - 类 中的方法com.easemob.chat.EMContact
-
获得此联系人的昵称
- getNoticedBySound() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getNoticedByVibrate() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取新消息震动设置,缺省 true
- getNotificationEnable() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getNotifyBySoundAndVibrate() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getNotifyRingUri() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getNumberOfMessagesLoaded() - 类 中的方法com.easemob.chat.EMChatOptions
-
首次会话获取消息条数
- getOfflineInterval() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getOfflineMessageBroadcastAction() - 类 中的方法com.easemob.chat.EMChatManager
-
- getOldValue() - 类 中的方法com.easemob.EMChangeEventData
-
- getPageCount() - 类 中的方法com.easemob.chat.EMPageResult
-
- getPublicGroupsFromServer(int, String) - 类 中的方法com.easemob.chat.EMGroupManager
-
从服务器获取公开群组
- getReceiveNoNotifyGroup() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getRemoteBitrate() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
接收视频比特率,单位为kbps
- getRemoteUrl() - 类 中的方法com.easemob.chat.FileMessageBody
-
远程图片,声音等的url
- getRequireAck() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取已读确认设置,缺省 true 如果设为true,会要求消息的接受方发送已读回执。
- getRequireDeliveryAck() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取送达确认设置,缺省 false, 如果设为true,会要求消息的接受方发送送达回执。
- getRequireServerAck() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取服务器端接收回执设置,缺省 true 如果设为true,发送消息时会等待服务器端发送的相应接收回执。
- getRobotsFromServer() - 类 中的方法com.easemob.chat.EMChatManager
-
获取Robot列表
- getSecret() - 类 中的方法com.easemob.chat.FileMessageBody
-
- getStorageUrl() - 类 中的方法com.easemob.chat.EMChatConfig
-
- getStringAttribute(String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 String 类型扩展属性
- getStringAttribute(String, String) - 类 中的方法com.easemob.chat.EMMessage
-
获取 String 类型扩展属性
- getThumbnailSecret() - 类 中的方法com.easemob.chat.ImageMessageBody
-
- getThumbnailSecret() - 类 中的方法com.easemob.chat.VideoMessageBody
-
- getThumbnailUrl() - 类 中的方法com.easemob.chat.ImageMessageBody
-
获取 缩略图的url
接受消息时,sdk 会自动下载缩略图,存储到本地
- getThumbnailUrl() - 类 中的方法com.easemob.chat.VideoMessageBody
-
获取缩略图的url 接受消息时,sdk会自动下载缩略图,存储到本地
- getTo() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息接收者的用户名
get receiver name
- getToken(String) - 类 中的方法com.easemob.chat.EMChatDB
-
已过时。
get token
- getTotalMessageCountByMsgType(EMMessage.Type, EMMessage.ChatType, String) - 类 中的方法com.easemob.chat.EMChatManager
-
返回单聊(群聊)下的某一类型的消息总数
- getType() - 类 中的方法com.easemob.chat.EMConversation
-
- getType() - 类 中的方法com.easemob.chat.EMMessage
-
获取消息类型
get message chat type
- getUnreadMsgCount() - 类 中的方法com.easemob.chat.EMConversation
-
获取此对话中未读取的消息数目
- getUnreadMsgsCount() - 类 中的方法com.easemob.chat.EMChatManager
-
获取未读消息计数
get unread mesage count
- getUseEncryption() - 类 中的方法com.easemob.chat.EMChatOptions
-
获取加密设置
- getUsername() - 类 中的方法com.easemob.chat.EMContact
-
获取此联系人的用户名
- getUserName() - 类 中的方法com.easemob.chat.EMConversation
-
获取此对话的用户名 或群组名
- getUsername() - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
the chatter which is either user id or group id
- getUserName() - 类 中的方法com.easemob.chat.EMMessage
-
获取通话对象
- getUserNameFromEid(String) - 类 中的静态方法com.easemob.chat.EMContactManager
-
- getUseRoster() - 类 中的方法com.easemob.chat.EMChatOptions
-
是否启用服务器端的好友列表
- getUsersOfNotificationDisabled() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getUseSpeaker() - 类 中的方法com.easemob.chat.EMChatOptions
-
- getVersion() - 类 中的方法com.easemob.chat.EMChat
-
获取环信sdk 的版本
get sdk version
- getVideoFileLength() - 类 中的方法com.easemob.chat.VideoMessageBody
-
获取视频文件的文件大小
- getVideoFramerate() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
帧率
- getVideoHeight() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
对方图像高度
- getVideoLostcnt() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
每一百个包中丢包个数
- getVideoOrientation() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
- getVideoTimedelay() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
//时延,单位是ms
- getVideoWidth() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
对方图像宽度
- getVoiceInputLevel() - 类 中的方法com.easemob.chat.EMChatManager
-
获取通话时声音输入的大小(范围0-9)
- getWidth() - 类 中的方法com.easemob.chat.ImageMessageBody
-
- GROUP_ADD_MEMBERS_TOO_MUCH - 类 中的静态变量com.easemob.EMError
-
要加入的用户人数超过剩余可加入的人数
- GROUP_MEMBERS_FULL - 类 中的静态变量com.easemob.EMError
-
群组成员数已满
- GROUP_NO_PERMISSIONS - 类 中的静态变量com.easemob.EMError
-
群组权限问题
- GROUP_NOT_EXIST - 类 中的静态变量com.easemob.EMError
-
群组不存在
- GROUP_NOT_EXIST_LOCAL - 类 中的静态变量com.easemob.EMError
-
本地不存在这个群组
- GROUP_USER_IN_BLACKLIST - 类 中的静态变量com.easemob.EMError
-
用户在黑名单列表中
- GroupChangeListener - com.easemob.chat中的接口
-
- GroupReomveListener - com.easemob.chat中的类
-
群组被解散或者被T的监听的适配器,对这两个回调外的方法做了默认实现
- GroupReomveListener() - 类 的构造器com.easemob.chat.GroupReomveListener
-
- leaveChatRoom(String) - 类 中的方法com.easemob.chat.EMChatManager
-
离开聊天室,SDK保证聊天室退出成功,无论网络情况如何
leave chat room and sdk will ensure leaving is successful whenever what happens, for example, no network.
- loadAllConversations(EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
- loadAllConversations() - 类 中的方法com.easemob.chat.EMChatManager
-
同步加载所有的会话,并且每条会话读入EMChatOptions.getNumberOfMessagesLoaded()条消息, 默认是20条以保持兼容
APP可以在用EMChatOptions.setNumberOfMessagesLoaded去设置初始条数(建议是1)
- loadAllGroups() - 类 中的方法com.easemob.chat.EMChatDB
-
已过时。
- loadAllGroups(EMCallBack) - 类 中的方法com.easemob.chat.EMGroupManager
-
load所有本地的群组
load all local groups asynchronously from db to cache, please ensure to call this api before geting the group from cache
- loadAllGroups() - 类 中的方法com.easemob.chat.EMGroupManager
-
load all local groups synchronrously
- loadGroup(String) - 类 中的方法com.easemob.chat.EMChatDB
-
已过时。
- loadMessage(String) - 类 中的方法com.easemob.chat.EMConversation
-
加载一条消息,如果缓存不存在会去DB查询并加载
- loadMessages(List<String>) - 类 中的方法com.easemob.chat.EMConversation
-
加载一组消息,如果缓存不存在会去DB查询并加载
- loadMoreGroupMsgFromDB(String, int) - 类 中的方法com.easemob.chat.EMConversation
-
根据传入的参数从db加载startMsgId之前(存储顺序)指定数量的群聊message,
加载到的messages会加入到当前conversation的messages里
- loadMoreMessages(boolean, String, int) - 类 中的方法com.easemob.chat.EMConversation
-
根据传入的参数从db加载startMsgId之前(后)(存储顺序)指定数量的message,
加载到的messages会加入到当前conversation的messages里
- loadMoreMsgFromDB(String, int) - 类 中的方法com.easemob.chat.EMConversation
-
根据传入的参数从db加载startMsgId之前(存储顺序)指定数量的message,
加载到的messages会加入到当前conversation的messages里
- LocalBinder() - 类 的构造器com.easemob.chat.EMChatService.LocalBinder
-
- LocationMessageBody - com.easemob.chat中的类
-
位置信息消息
LocationMessageBody body = new LocationMessageBody(“地址”, 30.010378, 104.358878);
- LocationMessageBody(String, double, double) - 类 的构造器com.easemob.chat.LocationMessageBody
-
创建一个位置信息
- login(String, String, EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
登陆到聊天服务器
环信郑重提示此login函数是用来登录环信账号的初始化API,在回调函数没有返回的情况下重复多次调用此函数会导致负面的影响
自动登录的情况下(就是之前登录过从没注销过),无需再次调用此函数,在这种情况下,客户端可以通过监听连接回调函数addConnectionListener(final EMConnectionListener listener)
,来进一步处理连接成功后的业务
login to easemob server
Please try to call this api again until last call to this api is returned, otherwise multiple calls to this api will cause side effect.
- LOGOFFINPROGRESS_ERROR - 类 中的静态变量com.easemob.EMError
-
Reserved for future usage
- logout() - 类 中的方法com.easemob.chat.EMChatManager
-
此方法改成同步登出聊天服务器
如果需要异步请参考logout(final EMCallBack callback)
logout easemob IM server synchronously
in case if you need an asynchronously API, please use logout(final EMCallBack callback)
- logout(EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
异步登出聊天服务器
请等待callback回调,再继续做和环信sdk相关的操作
logout easemob IM server asynchronously
- logout(boolean, EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
异步登出聊天服务器(国际化)
请等待callback回调,再继续做和环信sdk相关的操作
- logout(boolean) - 类 中的方法com.easemob.chat.EMChatManager
-
此方法改成同步登出聊天服务器(国际化)
如果需要异步请参考logout(final boolean isUnbindDeviceToken,final EMCallBack callback)
logout synchronously and support GCM push
- saveBlackList(List<String>) - 类 中的方法com.easemob.chat.EMContactManager
-
保存黑名单列表
save black list to local db
- saveMessage(EMMessage) - 类 中的方法com.easemob.chat.EMChatManager
-
保存用户app 生成的消息,比如系统提示 消息会存到内存中的conversation 和数据库
save the message to memory and db
- saveMessage(EMMessage, boolean) - 类 中的方法com.easemob.chat.EMChatManager
-
保存用户app 生成的消息,比如系统提示 消息会存到内存中的conversation 和数据库
- saveToken(String, EMInternalConfigManager.Token) - 类 中的方法com.easemob.chat.EMChatDB
-
已过时。
save token
- sendGroupMessage(EMMessage, EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
- sendMessage(EMMessage) - 类 中的方法com.easemob.chat.EMChatManager
-
异步发送消息 如果是语音,图片类有附件的消息,sdk 会自动上传附件
send message asynchronously and since SDK v2.2.2, msg status change notification will be notifyied through EMMessage status callback
and you can set this message status callback through EMMessage.setMessageStatusCallback
- sendMessage(EMMessage, EMCallBack) - 类 中的方法com.easemob.chat.EMChatManager
-
异步发送消息, 通过回调通知用户发送状态
- setAcceptInvitationAlways(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否自动接受加好友邀请。
- setAcked(boolean) - 类 中的方法com.easemob.chat.EMMessage
-
- setAdaptiveVideoFlag(boolean) - 类 中的方法com.easemob.chat.EMChatManager
-
视频通话时是否自动调节码率,默认是false
- setAgents(List<String>) - 类 中的方法com.easemob.chat.EMCustomerServiceConfiguration
-
客服的环信ID列表
- setAppInited() - 类 中的方法com.easemob.chat.EMChat
-
SDK 会发送broadcast intent 通知UI,比如好友邀请。
- setAppkey(String) - 类 中的方法com.easemob.chat.EMChat
-
设置appkey
- setAttribute(String, boolean) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的boolean 类型扩展属性
- setAttribute(String, int) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的int 类型扩展属性
- setAttribute(String, long) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的long 类型扩展属性
- setAttribute(String, JSONObject) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的 JSONObject 类型扩展属性
- setAttribute(String, JSONArray) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的 JSONArray 类型扩展属性
- setAudioFileWithExt(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否聊天时接收到的语音文件带有扩展名(xxx.amr),默认为false
- setAutoAcceptInvitation(boolean) - 类 中的方法com.easemob.chat.EMGroupManager
-
是否自动接受群组邀请 如果设为true,sdk 会对群组邀请自动回复加入
- setAutoConversatonsLoaded(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
if the auto loading all conversations is enabled
if enabled, SDK will automatically load all the conversations on login
- setAutoLogin(boolean) - 类 中的方法com.easemob.chat.EMChat
-
设置SDK启动是是否自动连接聊天服务器。
- setChatOptions(EMChatOptions) - 类 中的方法com.easemob.chat.EMChatManager
-
设置聊天sdk 的相关参数,配置 可以在应用启动的时候设置相应的值。
- setChatType(EMMessage.ChatType) - 类 中的方法com.easemob.chat.EMMessage
-
设置聊天类型, 缺省为单聊 ChatType.Chat
- setContactListener(EMContactListener) - 类 中的方法com.easemob.chat.EMContactManager
-
- setCount(long) - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
- setDebugMode(boolean) - 类 中的方法com.easemob.chat.EMChat
-
debugMode == true 时,sdk 会在log里输入调试信息
- setDeleteMessagesAsExitGroup(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置退出(主动和被动退出)群组时是否删除聊天消息
enable/disable deleting the group message after existing the group
- setDelivered(boolean) - 类 中的方法com.easemob.chat.EMMessage
-
- setDownloadCallback(EMCallBack) - 类 中的方法com.easemob.chat.FileMessageBody
-
- setEid(String) - 类 中的方法com.easemob.chat.EMContact
-
- setEncryptProvider(EncryptProvider) - 类 中的方法com.easemob.chat.EMChatManager
-
设置应用的加密实现 如果未设置,SDK 会使用内置的加密算法
set the encrypt provider.
- setEnv(EMChatConfig.EMEnvMode) - 类 中的方法com.easemob.chat.EMChat
-
设置测试环境/生产环境
建议各app测试时设置测试环境
- setEvent(EMNotifierEvent.Event) - 类 中的方法com.easemob.EMNotifierEvent
-
- setEventData(Object) - 类 中的方法com.easemob.EMNotifierEvent
-
- setExtField(String) - 类 中的方法com.easemob.chat.EMConversation
-
用户可以自行定义会话扩展字段
该字段只保存在本地,不进行网络同步
- setFileName(String) - 类 中的方法com.easemob.chat.FileMessageBody
-
- setFrom(String) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息发送者
set sender name
- setGCMProjectNumber(String) - 类 中的方法com.easemob.chat.EMChatManager
-
for GCM support, to set GCM number
- setGroup(boolean) - 类 中的方法com.easemob.chat.EMConversation
-
- setGroupId(String) - 类 中的方法com.easemob.chat.EMGroup
-
设置群ID
- setGroupId(String) - 类 中的方法com.easemob.chat.EMGroupInfo
-
- setGroupName(String) - 类 中的方法com.easemob.chat.EMGroup
-
设置群名称
- setGroupName(String) - 类 中的方法com.easemob.chat.EMGroupInfo
-
- setGroupsOfNotificationDisabled(List<String>) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setHuaweiPushAppId(String) - 类 中的方法com.easemob.chat.EMChatManager
-
设置用于华为推送的appid
- setInitSingleProcess(boolean) - 类 中的方法com.easemob.chat.EMChat
-
设置sdk 只初始化一次 -- 在主进程初始化
缺省是true
如果设成false,application 需要保证环信sdk 只被初始化一次
- setIsPublic(boolean) - 类 中的方法com.easemob.chat.EMGroup
-
- setListened(boolean) - 类 中的方法com.easemob.chat.EMMessage
-
设置语音是否已听
- setLocalThumb(String) - 类 中的方法com.easemob.chat.VideoMessageBody
-
- setLocalUrl(String) - 类 中的方法com.easemob.chat.FileMessageBody
-
- setLogMode(EMLog.ELogMode) - 类 中的方法com.easemob.chat.EMChat
-
- setMessage(EMMessage) - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
- setMessageListened(EMMessage) - 类 中的方法com.easemob.chat.EMChatManager
-
mark the audio/video message has been listened
- setMessageStatusCallback(EMCallBack) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息状态改变的回调
set message status callback, your app should set this callback to get message status and then refresh the ui accordingly
- setMipushConfig(String, String) - 类 中的方法com.easemob.chat.EMChatManager
-
设置用于小米推送的appid和appkey
- setMsgId(String) - 类 中的方法com.easemob.chat.EMMessage
-
set local message id
- setMsgTime(long) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息的发送或者接收时间
set message time stamp
- setNewValue(T) - 类 中的方法com.easemob.EMChangeEventData
-
- setNick(String) - 类 中的方法com.easemob.chat.EMContact
-
设置昵称
- setNoticeBySound(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否使用声音提示,缺省true
- setNoticedByVibrate(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否使用震动提示 ,缺省true
- setNotificationEnable(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setNotifyBySoundAndVibrate(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setNotifyRingUri(Uri) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setNotifyText(OnMessageNotifyListener) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setNumberOfMessagesLoaded(int) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置首次会话加载消息条数(默认加载20条)
设置1条情况下,有优化加载速度
- setOfflineInterval(long) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置接收离线消息间隔时间
set offline message notification inverval, since for current IM implementation, after login, sdk will receive a batch of offine message
but avoid to sending one by one which cause very frequently message notifcaiton, we send the offline messages in group with the offline time interval
默认是3秒
- setOldValue(T) - 类 中的方法com.easemob.EMChangeEventData
-
- setOnNotificationClickListener(OnNotificationClickListener) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setPassword(String) - 类 中的方法com.easemob.chat.EMChat
-
已过时。
- setPublic(boolean) - 类 中的方法com.easemob.chat.EMGroup
-
- setReceipt(String) - 类 中的方法com.easemob.chat.EMMessage
-
- setReceiveNotNoifyGroup(List<String>) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setRemoteUrl(String) - 类 中的方法com.easemob.chat.FileMessageBody
-
- setRenderFlag(boolean) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
false为不再显示对方图像
- setRequireAck(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否需要接受方已读确认
enable/disable the read ack of recipit
- setRequireDeliveryAck(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否需要接受方送达确认,默认false
enable/disable deliver ack
- setRequireServerAck(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否需要服务器端确认接收到消息
enable/disable server ack after sending message, and that's true by default
- setResolution(int, int) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
- setSecret(String) - 类 中的方法com.easemob.chat.FileMessageBody
-
- setSendOriginalImage(boolean) - 类 中的方法com.easemob.chat.ImageMessageBody
-
设置发送图片时,是否发送原图,默认是发送压缩过后的图(图片超过100k会被压缩)
- setServerAddress(String[], String[]) - 类 中的方法com.easemob.chat.EMChat
-
the server string should strictly follow the rule: server_address:port for example: 212.23.34.88:443
if port is not found for im server, 443 is used by default and 80 is used for rest server.
- setShowNotificationInBackgroud(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setSurfaceView(SurfaceView) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
set the surface view to show receiver's video
- setThumbnailSecret(String) - 类 中的方法com.easemob.chat.ImageMessageBody
-
- setThumbnailSecret(String) - 类 中的方法com.easemob.chat.VideoMessageBody
-
- setThumbnailUrl(String) - 类 中的方法com.easemob.chat.ImageMessageBody
-
- setThumbnailUrl(String) - 类 中的方法com.easemob.chat.VideoMessageBody
-
- setTo(String) - 类 中的方法com.easemob.chat.EMMessage
-
设置消息
set receiver name
- setType(EMMessage.Type) - 类 中的方法com.easemob.chat.EMMessage
-
- setUnread(boolean) - 类 中的方法com.easemob.chat.EMMessage
-
- setUseEncryption(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否加密发送,确实是不加密 (主意:加密设置只是和消息发送相关。
- setUserName(String) - 类 中的方法com.easemob.chat.EMChat
-
已过时。
- setUsername(String) - 类 中的方法com.easemob.chat.EMContact
-
设置此联系人的用户名
- setUsername(String) - 类 中的方法com.easemob.chat.EMKeywordSearchInfo
-
- setUseRoster(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
设置是否使用服务器端好友列表, 缺省不使用,用应用内部维护用户的好友/联系人列表
enable/disalbe using easemob friend management
- setUsersOfNotificationDisabled(List<String>) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setUseSpeaker(boolean) - 类 中的方法com.easemob.chat.EMChatOptions
-
- setVideoBitrate(int) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
设置视频比特率
- setVideoFileLength(long) - 类 中的方法com.easemob.chat.VideoMessageBody
-
- setVideoOrientation(EMVideoCallHelper.EMVideoOrientation) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
- source - 类 中的变量com.easemob.EMMessageChangeEventData
-
本数据包里的改变源
- StartServiceReceiver - com.easemob.chat中的类
-
- StartServiceReceiver() - 类 的构造器com.easemob.chat.StartServiceReceiver
-
已过时。
- startVideoRecord(String) - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
开始视频录制
- status - 类 中的变量com.easemob.chat.EMMessage
-
消息的状态
- stop() - 类 中的方法com.easemob.chat.EMNotifier
-
已过时。
- stopVideoRecord() - 类 中的方法com.easemob.chat.EMVideoCallHelper
-
停止视频录制
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMCallStateChangeListener.CallError
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMCallStateChangeListener.CallState
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMChatConfig.EMEnvMode
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMChatConfig.EMSDKMode
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMConversation.EMConversationType
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMMessage.ChatType
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMMessage.Direct
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMMessage.Status
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMMessage.Type
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.chat.EMVideoCallHelper.EMVideoOrientation
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.EMMessageChangeEventData.EMChangeSource
-
返回带有指定名称的该类型的枚举常量。
- valueOf(String) - 枚举 中的静态方法com.easemob.EMNotifierEvent.Event
-
返回带有指定名称的该类型的枚举常量。
- values() - 枚举 中的静态方法com.easemob.chat.EMCallStateChangeListener.CallError
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMCallStateChangeListener.CallState
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMChatConfig.EMEnvMode
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMChatConfig.EMSDKMode
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMConversation.EMConversationType
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMMessage.ChatType
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMMessage.Direct
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMMessage.Status
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMMessage.Type
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.chat.EMVideoCallHelper.EMVideoOrientation
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.EMMessageChangeEventData.EMChangeSource
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- values() - 枚举 中的静态方法com.easemob.EMNotifierEvent.Event
-
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
- VideoMessageBody - com.easemob.chat中的类
-
消息里的视频文件附加信息
VideoMessageBody body = new VideoMessageBody(videoFile, length);
- VideoMessageBody() - 类 的构造器com.easemob.chat.VideoMessageBody
-
- VideoMessageBody(File, String, int, long) - 类 的构造器com.easemob.chat.VideoMessageBody
-
创建一个视频附加的消息体
- VoiceMessageBody - com.easemob.chat中的类
-
消息里的语音文件附加信息
VoiceMessageBody body = new VoiceMessageBody(voiceFile, length);
- VoiceMessageBody(File, int) - 类 的构造器com.easemob.chat.VoiceMessageBody
-
创建一个语音附加的消息体