send Image Message
Sends an image message.
If you are using IMLib, you can use this method to send an image message. If you are using IMKit, please use the method with the same name in RongIM to send the image message; otherwise, the UI will not be updated automatically.
Parameters
The type of conversation.
The ID of the conversation. Depending on the conversationType, this could be a user ID, discussion group ID, group ID, or chatroom ID.
The message content, such as TextMessage, ImageMessage.
When sending a remote push notification, this field will be displayed in the notification bar. If you are sending a custom message, this field must be filled in; otherwise, the remote push notification will not be received. If you are sending default message types in the SDK, such as RC:TxtMsg, RC:VcMsg, RC:ImgMsg, this field does not need to be filled in as it is already specified by default.
Additional information for the remote push notification. If this field is set, users can retrieve it via getPushData when they receive the remote push notification.
The callback for sending the message. Refer to .
Sends an image message.
If you are using IMLib, you can use this method to send an image message. If you are using IMKit, please use the method with the same name in RongIM to send an image message; otherwise, the UI will not be automatically updated.
Parameters
The message object to be sent.
This field will be displayed in the notification bar when a remote push notification is sent. If you are sending a custom message, this field must be filled in; otherwise, the remote push notification will not be received. If you are sending default message types in the SDK, such as RC:TxtMsg, RC:VcMsg, RC:ImgMsg, this field does not need to be filled in, as it is already specified by default.
Additional information for remote push notifications. If this field is set, users can retrieve it via getPushData when they receive a remote push notification.
The callback for sending the message. Refer to .
Send an image message.
This method uploads the image to your own server for sending and updates the image status. When using this method to upload an image, the will be triggered. This callback carries an UploadImageStatusListener object, and the user only needs to call the following methods:update to update the progress success to update the success status and provide the uploaded image URL error to update the failure status
Parameters
The message entity to be sent.
This field will be displayed in the notification bar when a remote push notification is sent. For custom messages, this field must be filled in; otherwise, the remote push notification will not be received. For default message types in the SDK, such as RC:TxtMsg, RC:VcMsg, RC:ImgMsg, this field is not required as it is already specified by default.
Additional information for remote push notifications. If this field is set, users can retrieve it via getPushData when receiving a remote push notification.
The callback for sending the message, which carries an object. Users can call methods in this object to update the status.