send Directional Message
Send a targeted message.
This method is used to send a message to specific users in a group or ultra group. Other users will not receive this message.
The message status and message body are returned through the methods in .
This method can only send non-multimedia messages. For multimedia messages such as , io.rong.message.FileMessage, or other messages inherited from io.rong.message.MediaMessageContent, use sendDirectionalMessage
If you are using IMLib, you can use this method to send targeted messages. If you are using IMKit, please use the method of the same name in RongIM to send targeted messages; otherwise, the UI will not be updated automatically.
Starting from version 5.6.9, ultra group conversation types are supported.
Since
5.1.1
Parameters
The conversation type.
The conversation ID. This could be a group ID or ultra group ID.
The business identifier of the conversation to which the message belongs.
The message content, such as io.rong.message.TextMessage, .
When a remote push notification is sent, 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 remote push notifications. If this field is set, users can retrieve it via getPushData when they receive a remote push notification.
The list of users in the discussion group or group conversation who will receive this message.
Additional options for sending the message. Currently, only isVoIPPush is supported. If the recipient's device is iOS, setting isVoIPPush to True will send the push notification via the VoIP channel.
The callback for sending the message. Refer to .
Sends a targeted message.
This method is used to send a message to specific users within a group or ultra group, while other users will not receive this message.
The message status and message body are returned through the methods in .
This method can only send non-multimedia messages. For multimedia messages such as , io.rong.message.FileMessage, or any other messages that inherit from io.rong.message.MediaMessageContent, use sendDirectionalMessage
If you are using IMLib, you can use this method to send targeted messages. If you are using IMKit, use the method with the same name in RongIM to send targeted messages; otherwise, the UI will not be automatically updated.
Starting from version 5.6.9, ultra group conversation types are supported.
Since
5.2.3
Parameters
The message object to be sent.
When a remote push notification is sent, 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 remote push notifications. If this field is set, users can retrieve it via getPushData when they receive the remote push notification.
The list of users in the discussion group or group who will receive this message.
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.
The callback for sending the message. Refer to .