|
NIMSDK-AOS
9.21.15
|
Created by hzsunyj on 2019-05-16. 更多...
Public 成员函数 | |
| InvocationFuture< Void > | sendMessage (IMMessage msg, boolean resend) |
| 发送消息。 如果需要更新发送进度,请调用MsgServiceObserve#observeMsgStatus(com.netease.nimlib.sdk.Observer, boolean) 更多... | |
| InvocationFuture< Void > | sendCustomNotification (CustomNotification notification) |
| 发送一条指令消息。 由于SDK仅负责透传该消息,因此不会记录指令消息状态,但可以设置回调函数监听发送结果。 更多... | |
| void | updateIMMessageStatus (IMMessage message, boolean notify) |
| 更新消息记录的状态。可更新: 消息状态 IMMessage#getStatus() 不为 null 时更新 附件状态 IMMessage#getAttachStatus() 不为 null 时更新 附件内容 IMMessage#getAttachment() 不为 null 时更新 更多... | |
| void | updateMessage (IMMessage msg, boolean notify) |
| 更新消息,将原始消息替换掉 更多... | |
| void | registerAttachmentParser (int type, MsgAttachmentParser customParser) |
| 如果第三方app需要自定义的附件消息类型,再次注册自己的附件解析器。 客户自定义的消息类型为com.netease.nimlib.sdk.msg.constant.MsgTypeEnum#custom 自定义附件类型须继承自MsgAttachment。 更多... | |
| InvocationFuture< Void > | saveMessageToLocal (IMMessage msg, boolean notify) |
| 保存消息到本地数据库,但不发送到服务器端。用于第三方APP保存本地提醒一类的消息。 该接口将消息保存到数据库后,如果需要通知到UI,可将notify设置为true,此时会触发MsgServiceObserve#observeReceiveMessage(Observer, boolean)通知。 更多... | |
Created by hzsunyj on 2019-05-16.
在文件 YsfService.java 第 15 行定义.
| void com.netease.nimlib.sdk.ysf.YsfService.registerAttachmentParser | ( | int | type, |
| MsgAttachmentParser | customParser | ||
| ) |
如果第三方app需要自定义的附件消息类型,再次注册自己的附件解析器。
客户自定义的消息类型为com.netease.nimlib.sdk.msg.constant.MsgTypeEnum#custom
自定义附件类型须继承自MsgAttachment。
| type | 消息类型 |
| customParser | 附件解析器 |
| InvocationFuture<Void> com.netease.nimlib.sdk.ysf.YsfService.saveMessageToLocal | ( | IMMessage | msg, |
| boolean | notify | ||
| ) |
保存消息到本地数据库,但不发送到服务器端。用于第三方APP保存本地提醒一类的消息。
该接口将消息保存到数据库后,如果需要通知到UI,可将notify设置为true,此时会触发MsgServiceObserve#observeReceiveMessage(Observer, boolean)通知。
| msg | 待保存的消息对象 |
| notify | 是否要通知UI更新界面 |
| InvocationFuture<Void> com.netease.nimlib.sdk.ysf.YsfService.sendCustomNotification | ( | CustomNotification | notification | ) |
发送一条指令消息。
由于SDK仅负责透传该消息,因此不会记录指令消息状态,但可以设置回调函数监听发送结果。
| notification | 指令消息 |
| InvocationFuture<Void> com.netease.nimlib.sdk.ysf.YsfService.sendMessage | ( | IMMessage | msg, |
| boolean | resend | ||
| ) |
发送消息。
如果需要更新发送进度,请调用MsgServiceObserve#observeMsgStatus(com.netease.nimlib.sdk.Observer, boolean)
| msg | 带发送的消息体,由MessageBuilder构造 |
| resend | 如果是发送失败后重发,标记为true,否则填false |
| void com.netease.nimlib.sdk.ysf.YsfService.updateIMMessageStatus | ( | IMMessage | message, |
| boolean | notify | ||
| ) |
更新消息记录的状态。可更新:
消息状态 IMMessage#getStatus() 不为 null 时更新
附件状态 IMMessage#getAttachStatus() 不为 null 时更新
附件内容 IMMessage#getAttachment() 不为 null 时更新
| message | 待更新的消息记录 |
| notify | 更新之后是否要通知UI更新界面 |
| void com.netease.nimlib.sdk.ysf.YsfService.updateMessage | ( | IMMessage | msg, |
| boolean | notify | ||
| ) |
更新消息,将原始消息替换掉
| msg | 待更新的消息体,由MessageBuilder构造 |
| notify | 更新之后是否要通知UI更新界面 |
1.8.11