处理用户消息的收发。消息发送由 MessageService 服务类提供,消息的接收由客户端实现 MessageListener来被动接收。
UserAgentProxy proxy = UserAgentProxy.getInstance(); ...... MessageService messageService = proxy.getMessageService();
MessageListener 实现用于接收消息, MessageListener 接口说明
public class MessageService { public synchronized void setMessageListener(MessageListener listener) {} }
发送给个人
public class MessageService { public boolean sendTextMessageToUser(String peerUserID, String content, String msg_uuid, boolean bReSendFlag){} }
发送给群组
public class MessageService { public boolean sendTextMessageToGroup(String groupID, String content, String msg_uuid, boolean bReSendFlag, int extraType){} }
露脸云提供了文件上传下载服务,详见 客户端 RSET 相关接口;也可以自己实现.
发送给个人
public class MessageService { public boolean sendImageUrlToUser(String peerUserID, String url, String msg_uuid, boolean bReSendFlag) {} }
发送给群组
public class MessageService { public boolean sendImageUrlToGroup(String peerUserID, String url, String msg_uuid, boolean bReSendFlag, int extraType) {} }
发送给个人
public class MessageService { public boolean sendAudioMessageToUser(String peerUserID, String url, String msg_uuid, boolean bReSendFlag) {} }
发送给群组
public class MessageService { public boolean sendAudioMessageToGroup(String groupID, String url, String msg_uuid, boolean bReSendFlag, int extraType) {} }
发送给个人
public class MessageService { public boolean sendVideoMessageToUser(String peerUserID, String describe, String shortUrl, String videoUrl, String msg_uuid, boolean bReSendFlag) {} }
发送给群组
public class MessageService { public boolean sendVideoMessageToGroup(String groupID, String describe, String shortUrl, String videoUrl, String msg_uuid, boolean bReSendFlag, int extraType) {} }
public class MessageService { public boolean messageReceived(long uuid) {} }
public class MessageService { public boolean messageRead(long uuid) {} }