-
public class UserMessageParams extends BaseMessageParams
Represents a user message params. sendUserMessage
-
-
Field Summary
Fields Modifier and Type Field Description String
message
List<String>
translationTargetLanguages
Long
pollId
String
mentionedMessageTemplate
-
Constructor Summary
Constructors Constructor Description UserMessageParams()
UserMessageParams constructor. UserMessageParams(String message)
UserMessageParams constructor.
-
Method Summary
Modifier and Type Method Description String
getMessage()
Returns message. UserMessageParams
setMessage(String message)
Sets message. List<String>
getTranslationTargetLanguages()
Returns translation target languages. UserMessageParams
setTranslationTargetLanguages(List<String> translationTargetLanguages)
Sets translation target languages. Long
getPollId()
Returns poll id.If it hasn't set before, it returns null.If setPollId(null) was lastly called, it returns -1. UserMessageParams
setPollId(@Nullable() Long pollId)
Sets pollId for this user message. String
getMentionedMessageTemplate()
Returns the message's mentioned message template. UserMessageParams
setMentionedMessageTemplate(@Nullable() String mentionedMessageTemplate)
Set the message's mentioned message template. UserMessageParams
setTargetLanguages(List<String> targetLanguages)
Sets targetLanguages. UserMessageParams
setData(String data)
Sets data. UserMessageParams
setCustomType(String customType)
Sets custom type. UserMessageParams
setMentionType(@NonNull() BaseMessageParams.MentionType mentionType)
Sets mention type. UserMessageParams
setMentionedUsers(List<User> mentionedUsers)
Set mentioned users. UserMessageParams
setMentionedUserIds(List<String> mentionedUserIds)
Set mentioned users ids. UserMessageParams
setPushNotificationDeliveryOption(BaseMessageParams.PushNotificationDeliveryOption pushNotificationDeliveryOption)
Sets push notification delivery option. UserMessageParams
setMetaArrayKeys(List<String> metaArrayKeys)
Sets meta array keys. UserMessageParams
setMetaArrays(List<MessageMetaArray> metaArrays)
Sets meta arrays. UserMessageParams
setParentMessageId(long parentMessageId)
Sets the parent message's id to create a child message. UserMessageParams
setAppleCriticalAlertOptions(@NonNull() AppleCriticalAlertOptions appleCriticalAlertOptions)
set apple critical alert options for this instance. UserMessageParams
setReplyToChannel(boolean replyToChannel)
Set whether to send the thread message to the channel as well. String
toString()
-
Methods inherited from class com.sendbird.android.BaseMessageParams
getAppleCriticalAlertOptions, getCustomType, getData, getMentionType, getMentionedUserIds, getMentionedUsers, getMetaArrays, getParentMessageId, getPushNotificationDeliveryOption, getReplyToChannel, getRootMessageId, setAppleCriticalAlertOptions, setReplyToChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
UserMessageParams
UserMessageParams()
UserMessageParams constructor.
-
UserMessageParams
UserMessageParams(String message)
UserMessageParams constructor.- Parameters:
message
- message
-
-
Method Detail
-
getMessage
@NonNull() String getMessage()
Returns message. If it hasn't set before, it returns empty string
-
setMessage
UserMessageParams setMessage(String message)
Sets message. sendUserMessage
- Parameters:
message
- message
-
getTranslationTargetLanguages
@Nullable() List<String> getTranslationTargetLanguages()
Returns translation target languages. If it hasn't set before, it returns null
-
setTranslationTargetLanguages
UserMessageParams setTranslationTargetLanguages(List<String> translationTargetLanguages)
Sets translation target languages. sendUserMessage
- Parameters:
translationTargetLanguages
- languages.
-
getPollId
@Nullable() Long getPollId()
Returns poll id.If it hasn't set before, it returns null.If setPollId(null) was lastly called, it returns -1. -1 means remove poll from the message
-
setPollId
@NonNull() UserMessageParams setPollId(@Nullable() Long pollId)
Sets pollId for this user message. Explicitly pass null to remove poll from this message.
- Parameters:
pollId
- id of the poll to link
-
getMentionedMessageTemplate
@Nullable() String getMentionedMessageTemplate()
Returns the message's mentioned message template.
-
setMentionedMessageTemplate
UserMessageParams setMentionedMessageTemplate(@Nullable() String mentionedMessageTemplate)
Set the message's mentioned message template.
- Parameters:
mentionedMessageTemplate
- The message's mentioned message template.
-
setTargetLanguages
@Deprecated() UserMessageParams setTargetLanguages(List<String> targetLanguages)
Sets targetLanguages. sendUserMessage
- Parameters:
targetLanguages
- targetLanguages
-
setData
UserMessageParams setData(String data)
Sets data. sendUserMessage
- Parameters:
data
- data
-
setCustomType
UserMessageParams setCustomType(String customType)
Sets custom type. sendUserMessage
- Parameters:
customType
- custom type
-
setMentionType
UserMessageParams setMentionType(@NonNull() BaseMessageParams.MentionType mentionType)
Sets mention type. sendUserMessage
- Parameters:
mentionType
- mention type.
-
setMentionedUsers
UserMessageParams setMentionedUsers(List<User> mentionedUsers)
Set mentioned users. Setting this will overwrite values set by setMentionedUserIds. sendUserMessage
- Parameters:
mentionedUsers
- mentionedUsers
-
setMentionedUserIds
UserMessageParams setMentionedUserIds(List<String> mentionedUserIds)
Set mentioned users ids. Setting this will overwrite values set by setMentionedUsers. sendUserMessage
- Parameters:
mentionedUserIds
- mentionedUserIds
-
setPushNotificationDeliveryOption
UserMessageParams setPushNotificationDeliveryOption(BaseMessageParams.PushNotificationDeliveryOption pushNotificationDeliveryOption)
Sets push notification delivery option. sendUserMessage
- Parameters:
pushNotificationDeliveryOption
- push notification delivery option
-
setMetaArrayKeys
@Deprecated() UserMessageParams setMetaArrayKeys(List<String> metaArrayKeys)
Sets meta array keys. sendUserMessage
- Parameters:
metaArrayKeys
- metaArrayKeys
-
setMetaArrays
UserMessageParams setMetaArrays(List<MessageMetaArray> metaArrays)
Sets meta arrays. sendUserMessage
- Parameters:
metaArrays
- metaArrays
-
setParentMessageId
UserMessageParams setParentMessageId(long parentMessageId)
Sets the parent message's id to create a child message. sendUserMessage.
- Parameters:
parentMessageId
- ParentBaseMessage
's id if you want to make it a threaded message.
-
setAppleCriticalAlertOptions
@NonNull() UserMessageParams setAppleCriticalAlertOptions(@NonNull() AppleCriticalAlertOptions appleCriticalAlertOptions)
set apple critical alert options for this instance.
- Parameters:
appleCriticalAlertOptions
- an instance of AppleCriticalAlertOptions
-
setReplyToChannel
@NonNull() UserMessageParams setReplyToChannel(boolean replyToChannel)
Set whether to send the thread message to the channel as well.
- Parameters:
replyToChannel
- whether to send the thread message to the channel as well.
-
-
-
-