sendImageMessage

public abstract void sendImageMessage(ConversationType type, String targetId, String channelId, MessageContent content, String pushContent, String pushData, IRongCoreCallback.SendImageMessageCallback callback)

发送图片消息。

如果您使用IMLib,可以使用此方法发送图片消息;

如果您使用 IMKit,请使用 RongIM 中的同名方法发送图片消息,否则不会自动更新 UI。

Since

5.1.1

Parameters

type

会话类型。

targetId

会话 id。根据不同的 conversationType,可能是用户 id、讨论组 id、群组 id 或聊天室 id。

channelId

消息所属会话的业务标识。

content

消息内容,例如 TextMessage, io.rong.message.ImageMessage。

pushContent

当下发远程推送消息时,在通知栏里会显示这个字段。 如果发送的是自定义消息,该字段必须填写,否则无法收到远程推送消息。 如果发送 SDK 中默认的消息类型,例如 RC:TxtMsg, RC:VcMsg, RC:ImgMsg,则不需要填写,默认已经指定。

pushData

远程推送附加信息。如果设置该字段,用户在收到远程推送消息时,能通过 getPushData 方法获取。

callback

发送消息的回调。参考 IRongCoreCallback.SendImageMessageCallback