sendMediaMessage

public abstract void sendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallback callback)

Sends a multimedia message.

Construct a Message entity before sending. The content in the message entity must be a multimedia message. For example: ImageMessage, FileMessage, or other messages inherited from MediaMessageContent.

Since

5.0.0

Parameters

message

The message entity to be sent.

pushContent

This field will be displayed in the notification bar when a remote push notification is sent. If sending a custom message, this field must be filled; otherwise, the remote push notification will not be received. If sending default message types in the SDK, such as RC:TxtMsg, RC:VcMsg, RC:ImgMsg, this field does not need to be filled as it is already specified by default.

pushData

Additional information for remote push notifications. If this field is set, users can retrieve it via the getPushData method when they receive the remote push notification.

callback

The callback for sending the message .


public abstract void sendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallback callback)

Sends a multimedia message.

Before sending, construct a Message entity where the content must be a multimedia message. For example: ImageMessage, FileMessage, or other messages that inherit from MediaMessageContent.

Since

5.4.4

Parameters

message

The message entity to be sent.

pushContent

This field is displayed in the notification bar when a remote push notification is sent. If sending a custom message, 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.

pushData

Additional information for remote push notifications. If this field is set, users can retrieve it via getPushData when receiving the remote push notification.

callback

The callback for sending the message .

option

Additional options for sending the message. Currently, only isVoIPPush is supported. If the recipient device is iOS, setting isVoIPPush to True will send the push notification via the VoIP channel.


public abstract void sendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback)

Sends a multimedia message. This method can be used to upload multimedia files to your own server.

When uploading a multimedia file, the onAttached callback is triggered. This callback carries the IRongCoreCallback.MediaMessageUploader object. Users only need to call the following methods in this object: update to update the progress success to update the success status and provide the file URL after successful upload error to update the failure status cancel to update the cancellation status

Since

5.0.0

Parameters

message

The message entity to be sent.

pushContent

This field is 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, RC:FileMsg, this field does not need to be filled in as it is already specified by default.

pushData

Additional information for remote push notifications. If this field is set, users can retrieve it via the getPushData method when they receive a remote push notification.

callback

The callback for sending the message, which carries the object. Users can call methods in this object to update the status.


public abstract void sendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback)

Sends a multimedia message. This method can be used to upload multimedia files to your own server.

When uploading a multimedia file, the callback onAttached is triggered. This callback carries the object. Users only need to call the following methods from this object: update to update the progress success to update the success status and provide the file URL after successful upload error to update the failure status cancel to update the cancellation status

Since

5.4.4

Parameters

message

The message entity to be sent.

pushContent

When sending a remote push notification, this field will be displayed in the notification bar. If sending a custom message, this field must be filled; otherwise, the remote push notification will not be received. For default message types in the SDK, such as RC:TxtMsg, RC:VcMsg, RC:ImgMsg, RC:FileMsg, this field does not need to be filled as it is already specified by default.

pushData

Additional information for remote push notifications. If this field is set, users can retrieve it via getPushData when they receive the remote push notification.

callback

The callback for sending the message, which carries the object. Users can call methods from this object to update the status.

option

Additional options for sending the message. Currently, only isVoIPPush is supported. If the recipient's device is iOS and isVoIPPush is set to True, the push notification will be sent via the VoIP channel.