public interface YsfService
Modifier and Type | Method and Description |
---|---|
void |
registerAttachmentParser(int type,
MsgAttachmentParser customParser)
If third party apps require custom message types with attachments, the attachment parser must also be registered.
|
InvocationFuture<java.lang.Void> |
saveMessageToLocal(IMMessage msg,
boolean notify)
Store the message to the local database instead of server side.
|
InvocationFuture<java.lang.Void> |
sendCustomNotification(CustomNotification notification)
Send an instruction message.
|
InvocationFuture<java.lang.Void> |
sendMessage(IMMessage msg,
boolean resend)
send messages.
To update the progress, call MsgServiceObserve.observeMsgStatus(com.netease.nimlib.sdk.Observer, boolean) |
void |
updateIMMessageStatus(IMMessage message,
boolean notify)
Update message status.
|
void |
updateMessage(IMMessage msg,
boolean notify)
Update the message and replace the original message
|
InvocationFuture<java.lang.Void> sendMessage(IMMessage msg, boolean resend)
MsgServiceObserve.observeMsgStatus(com.netease.nimlib.sdk.Observer, boolean)
msg
- Message constructed by MessageBuilder
resend
- resend a message if sending failed, true: resend message. Otherwise, falseInvocationFuture<java.lang.Void> sendCustomNotification(CustomNotification notification)
notification
- The instruction messagevoid updateIMMessageStatus(IMMessage message, boolean notify)
IMMessage.getStatus()
. Update the status if null is not setIMMessage.getAttachStatus()
. Update the status if null is not setIMMessage.getAttachment()
. Update the status if null is not setmessage
- Message to be updatednotify
- specify whether to update the UI view for the message.void updateMessage(IMMessage msg, boolean notify)
msg
- message body constructed by MessageBuilder
notify
- specify whether to update the UI view for the message.void registerAttachmentParser(int type, MsgAttachmentParser customParser)
MsgTypeEnum.custom
type
- message typecustomParser
- Attachment parserInvocationFuture<java.lang.Void> saveMessageToLocal(IMMessage msg, boolean notify)
MsgServiceObserve.observeReceiveMessage(Observer, boolean)
will be triggered.msg
- Message to be savednotify
- Specify whether to update the UI view for the message