public interface YsfService
| 限定符和类型 | 方法和说明 |
|---|---|
void |
registerAttachmentParser(int type,
MsgAttachmentParser customParser)
如果第三方app需要自定义的附件消息类型,再次注册自己的附件解析器。
|
InvocationFuture<java.lang.Void> |
saveMessageToLocal(IMMessage msg,
boolean notify)
保存消息到本地数据库,但不发送到服务器端。
|
InvocationFuture<java.lang.Void> |
sendCustomNotification(CustomNotification notification)
发送一条指令消息。
|
InvocationFuture<java.lang.Void> |
sendMessage(IMMessage msg,
boolean resend)
发送消息。
|
void |
updateIMMessageStatus(IMMessage message,
boolean notify)
更新消息记录的状态。
|
void |
updateMessage(IMMessage msg,
boolean notify)
更新消息,将原始消息替换掉
|
InvocationFuture<java.lang.Void> sendMessage(IMMessage msg, boolean resend)
MsgServiceObserve.observeMsgStatus(com.netease.nimlib.sdk.Observer, boolean)msg - 带发送的消息体,由MessageBuilder构造resend - 如果是发送失败后重发,标记为true,否则填falseInvocationFuture<java.lang.Void> sendCustomNotification(CustomNotification notification)
notification - 指令消息void updateIMMessageStatus(IMMessage message, boolean notify)
NIMMessage.getStatus() 不为 null 时更新NIMMessage.getAttachStatus() 不为 null 时更新NIMMessage.getAttachment() 不为 null 时更新message - 待更新的消息记录notify - 更新之后是否要通知UI更新界面void updateMessage(IMMessage msg, boolean notify)
msg - 待更新的消息体,由MessageBuilder构造notify - 更新之后是否要通知UI更新界面void registerAttachmentParser(int type,
MsgAttachmentParser customParser)
type - 消息类型customParser - 附件解析器InvocationFuture<java.lang.Void> saveMessageToLocal(IMMessage msg, boolean notify)
MsgServiceObserve.observeReceiveMessage(Observer, boolean)通知。msg - 待保存的消息对象notify - 是否要通知UI更新界面