Class SendMediaMessageParams
-
- All Implemented Interfaces:
public final class SendMediaMessageParamsSend media message parameters.
Required parameters for sending a media message (image, file, voice, video, etc.).
Usage example:
val params = SendMediaMessageParams( ImageMessage().apply { localPath = "file:///path/to/image.jpg" } ).apply { pushConfig = PushConfig().apply { pushContent = "You received an image" } } channel.sendMediaMessage(params) { msg, error -> // ... }
-
-
Field Summary
Fields Modifier and Type Field Description private PushConfigpushConfigprivate Array<String>directedUserIdsprivate BooleandisableNotificationprivate BooleandisableUpdateLastMessageprivate Map<String, String>metadataprivate BooleanneedReceiptprivate final MediaMessageContentcontent
-
Constructor Summary
Constructors Constructor Description SendMediaMessageParams(MediaMessageContent content)
-
Method Summary
Modifier and Type Method Description final PushConfiggetPushConfig()Push configuration. final UnitsetPushConfig(PushConfig pushConfig)Push configuration. final Array<String>getDirectedUserIds()Target user ID list for directed messages. final UnitsetDirectedUserIds(Array<String> directedUserIds)Target user ID list for directed messages. final BooleangetDisableNotification()Whether to disable push notification for this message. final UnitsetDisableNotification(Boolean disableNotification)Whether to disable push notification for this message. final BooleangetDisableUpdateLastMessage()Whether to prevent this message from updating the channel's latest message. final UnitsetDisableUpdateLastMessage(Boolean disableUpdateLastMessage)Whether to prevent this message from updating the channel's latest message. final Map<String, String>getMetadata()Message metadata in key-value format. final UnitsetMetadata(Map<String, String> metadata)Message metadata in key-value format. final BooleangetNeedReceipt()Whether this message requires a read receipt. final UnitsetNeedReceipt(Boolean needReceipt)Whether this message requires a read receipt. final MediaMessageContentgetContent()-
-
Constructor Detail
-
SendMediaMessageParams
SendMediaMessageParams(MediaMessageContent content)
- Parameters:
content- media message content body, a MessageContent or its subclass
-
-
Method Detail
-
getPushConfig
final PushConfig getPushConfig()
Push configuration.
Used to customize the remote push title, content, additional data, etc. If sending a custom message, it is recommended to set PushConfig.pushContent; otherwise the recipient may not receive remote push notifications. SDK built-in message types (e.g. ImageMessage) do not need this, as defaults are already specified.
-
setPushConfig
final Unit setPushConfig(PushConfig pushConfig)
Push configuration.
Used to customize the remote push title, content, additional data, etc. If sending a custom message, it is recommended to set PushConfig.pushContent; otherwise the recipient may not receive remote push notifications. SDK built-in message types (e.g. ImageMessage) do not need this, as defaults are already specified.
-
getDirectedUserIds
final Array<String> getDirectedUserIds()
Target user ID list for directed messages.
When set, this media message is sent as a directed message. Only the specified users can receive it; it is not visible to other members in the channel.
null for normal sending, non-empty for directed sending.
-
setDirectedUserIds
final Unit setDirectedUserIds(Array<String> directedUserIds)
Target user ID list for directed messages.
When set, this media message is sent as a directed message. Only the specified users can receive it; it is not visible to other members in the channel.
null for normal sending, non-empty for directed sending.
-
getDisableNotification
final Boolean getDisableNotification()
Whether to disable push notification for this message.
When set to true, the recipient will not receive a push notification for this message.
-
setDisableNotification
final Unit setDisableNotification(Boolean disableNotification)
Whether to disable push notification for this message.
When set to true, the recipient will not receive a push notification for this message.
-
getDisableUpdateLastMessage
final Boolean getDisableUpdateLastMessage()
Whether to prevent this message from updating the channel's latest message.
When set to true, this message will not update the channel's last message display.
-
setDisableUpdateLastMessage
final Unit setDisableUpdateLastMessage(Boolean disableUpdateLastMessage)
Whether to prevent this message from updating the channel's latest message.
When set to true, this message will not update the channel's last message display.
-
getMetadata
final Map<String, String> getMetadata()
Message metadata in key-value format.
Supports remote sync. Can be used to attach custom key-value data to the message.
-
setMetadata
final Unit setMetadata(Map<String, String> metadata)
Message metadata in key-value format.
Supports remote sync. Can be used to attach custom key-value data to the message.
-
getNeedReceipt
final Boolean getNeedReceipt()
Whether this message requires a read receipt.
When set to true, the sender will be able to track whether recipients have read this message.
-
setNeedReceipt
final Unit setNeedReceipt(Boolean needReceipt)
Whether this message requires a read receipt.
When set to true, the sender will be able to track whether recipients have read this message.
-
getContent
final MediaMessageContent getContent()
-
-
-
-