Releases: sendbird/sendbird-chat-sdk-android
Releases · sendbird/sendbird-chat-sdk-android
v4.15.0
Features
- Supports new SendbirdChat KTX
v4.14.2
Improvements
- Fixed a bug where
NotificationCollectionHandler.onMessagesUpdated()
is called indefinitely in some cases
v4.14.1
Improvements
- Fix intermittent
ConcurrentModificationException
inMessageCollection
v4.14.0
Features
- Three new features related to Generative AI have been added: Form type, Suggested replies and Feedback.
- Form type: A form type message is a message that contains a form. A form is a set of questions that a user can answer to collect data from users.
- How to determine if a message is a form type message:
val BaseMessage.isFormTypeMessage: Boolean get() = this.forms.isNotEmpty()
- How to save the answer in the SDK when the user enters input:
editText.addTextChangedListener( object : TextWatcher { ... override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { formField.temporaryAnswer = Answer(formField.key, s.toString()) } } )
- Submits a form
// submits form message.submitForm(form) { e -> if (e != null) { // handle error } } // The submitted form is updated through a message update event. SendbirdChat.addChannelHandler( "IDENTIFIER", object : GroupChannelHandler() { ... override fun onMessageUpdated(channel: BaseChannel, message: BaseMessage) { message.forms.find { it.formKey == "TARGET_FORM_KEY" }?.isSubmitted // should be true // update message UI to submitted form } } )
- How to determine if a message is a form type message:
- Suggested replies: Suggested reply is a set of items that a user can click quickly to send a message. Suggested replies is contained in a last message.
SendbirdChat.addChannelHandler( "IDENTIFIER", object : GroupChannelHandler() { ... override fun onChannelChanged(channel: BaseChannel) { if (channel is GroupChannel) { val suggestedReplies = channel.lastMessage?.suggestedReplies if (!suggestedReplies.isNullOrEmpty()) { // draw suggested replies for the channel's last message } } } } )
- Feedback: Feedback is a feature that allows users to provide their satisfaction or dissatisfaction with the bot's responses.
- How to draw feedback UI
val feedback = message.myFeedback when (message.myFeedbackStatus) { FeedbackStatus.NOT_APPLICABLE -> { // this message is not applicable for feedback // Make thumbs-up/down UI invisible or disable here // `feedback` should be null } FeedbackStatus.NO_FEEDBACK -> { // The feedback is not submitted yet but user can submit feedback // Make thumbs-up/down UI visible or enable without being selected // `feedback` should be null } FeedbackStatus.SUBMITTED -> { // The feedback is submitted // Make thumbs-up/down UI visible or enable as selected // `feedback` should not be null } }
- How to submit / update / delete feedback
// submit feedback message.submitFeedback(FeedbackRating.Good) { feedback, e -> when { feedback != null -> { // update feedback UI } e != null -> { // handle error } } } // update feedback message.updateFeedback(FeedbackRating.Good, "Very good response") { feedback, e -> when { feedback != null -> { // update feedback UI } e != null -> { // handle error } } } // delete feedback message.deleteFeedback { e -> // handle error }
- How to draw feedback UI
- Form type: A form type message is a message that contains a form. A form is a set of questions that a user can answer to collect data from users.
- Introduced
BaseMessage.extras
to enable developers to include their own data inBaseMessage
and carry it seamlessly. - Added
logCustom(String, List<BaseMessage>)
inFeedChannel
.
Improvements
- Fix the bug where the internal network status flag is incorrect when an app starts from offline mode.
v4.13.0
Features
-
Added new read-only attribute
messageReviewInfo
inUserMessage
class UserMessage { // exist only if the message is in review or it has been approved val messageReviewInfo: MessageReviewInfo? } class MessageReviewInfo { val status: MessageReviewStatus val originalMessageInfo: OriginalMessageInfo? // (exist only if the status is approved) } enum class MessageReviewStatus { IN_REVIEW, APPROVED } class OriginalMessageInfo { val createdAt: Long val messageId: Long }
-
Added new read-only attribute
notificationMessageStatus
inBaseMessage
-
Added
markAsRead(List<BaseMessage>, CompletionHandler?)
inFeedChannel
-
Added
logImpression(List<BaseMessage>)
inFeedChannel
class BaseMessage { // This value represents the status value for the Notification message. The value `NONE` is returned for messages that are not Notification messages. val notificationMessageStatus: NotificationMessageStatus } enum class NotificationMessageStatus(val value: String) { NONE, SENT, READ }
Improvements
- Mitigated an ANR issue by lazy creation of properties within
SendbirdChat.init()
v4.12.3
Improvements
- Reduced delay in
GroupChannelCollection.loadMore()
when there's lots of channels
v4.12.2
Features
- Added
GroupChannel.getDeliveryStatus(Boolean): Map<String, DeliveryStatus>
to get delivery status of all members. - Added
BaseMessage.submitForm(String, Map<String, String>, CompletionHandler?)
, which allows you to submit form messages sent by the bot. Please note that form messages are delivered via BaseMessage.extendedMessages when all settings are properly configured on the server.
Improvements
- Fixed occasional
NoSuchElementException
when accessingGroupChannel.members
.
v4.12.1
Improvements
- Improved stability.
v4.12.0
Features
You can get the categories of a set FeedChannel and the channel's properties from the Dashboard.
- Added
isCategoryFilterEnabled
,isTemplateLabelEnabled
, andnotificationCategories
in FeedChannel
var isCategoryFilterEnabled: Boolean
var isTemplateLabelEnabled: Boolean
var notificationCategories: List<NotificationCategory>
You can obtain the data that you set when you send Notification to the template that you created in the dashboard.
- Added
notificationData
inBaseMessage
val notificationData: NotificationData?
v4.11.1
Improvements
- Added
enableAutoResend
inInitParams.LocalCacheConfig
to control auto-resending feature when local cache is enabled - Added
isBot
inSender
- Added
file
,url
getters inUploadableFileInfo
- Mitigated an ANR issue and a failure of initialization by reducing access to SharedPreferences in the main thread