public class DefaultSession extends Session
注意:此类并非线程安全,建议每次使用newInstance调用
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addOnHandleMessageListener(HandleMessageListener handleMassge)
添加监听器
|
static DefaultSession |
newInstance()
创建一个Session实例
|
void |
onErrorMsg(int errorCode)
错误消息
|
void |
onEventMsg(Msg4Event msg)
收到事件推送消息
|
void |
onImageMsg(Msg4Image msg)
收到图片消息
|
void |
onLinkMsg(Msg4Link msg)
收到链接消息
|
void |
onLocationMsg(Msg4Location msg)
收到地理位置消息
|
void |
onTextMsg(Msg4Text msg)
收到文本消息
|
void |
onVideoMsg(Msg4Video msg)
收到视频消息
|
void |
onVoiceMsg(Msg4Voice msg)
收到语音识别消息
|
void |
removeOnHandleMessageListener(HandleMessageListener handleMassge)
移除监听器
|
public static DefaultSession newInstance()
public void addOnHandleMessageListener(HandleMessageListener handleMassge)
handleMassge - 监听器public void removeOnHandleMessageListener(HandleMessageListener handleMassge)
handleMassge - 监听器public void onImageMsg(Msg4Image msg)
SessiononImageMsg 在类中 Sessionmsg - 消息public void onEventMsg(Msg4Event msg)
SessiononEventMsg 在类中 Sessionmsg - 消息public void onLocationMsg(Msg4Location msg)
SessiononLocationMsg 在类中 Sessionmsg - 消息public void onErrorMsg(int errorCode)
SessiononErrorMsg 在类中 SessionerrorCode - 错误码public void onVoiceMsg(Msg4Voice msg)
SessiononVoiceMsg 在类中 Sessionmsg - 消息public void onVideoMsg(Msg4Video msg)
SessiononVideoMsg 在类中 Sessionmsg - 消息Copyright © 2018. All rights reserved.