Chat / Android
Chat Android v4
Chat Android
Chat
Android
Home
/
Chat
/
Android
This is the new Docs for Chat SDK v4 for Android. To see the previous Docs, click here.

Migration guide

Sendbird Chat SDK v4 for Android has introduced major breaking changes to streamline the code structure and enhance its scalability.

This page explains the breaking changes and provides a step-by-step guide for migrating to v4.


Requirements

The minimum requirements for v4 are the following.

  • Android 5.0 (API level 21) or higher
  • Java 8 or higher
  • Android Gradle plugin 3.4.2 or higher
  • Firebase Cloud Messaging 19.0.1 or higher

Breaking changes

The following breaking changes have been made to the Chat SDK v4 for Android. For a full list of name changes, see the changelog section.

Structural changes

  • Convert language from Java to Kotlin.

  • Rename the main class from SendBird to SendbirdChat.

  • Add onConnected and onDisconnected to ConnectionHandler.

  • Split ChannelHandler into BaseChannelHandler, GroupChannelHandler, and OpenChannelHandler.

  • The requestId parameter is added to the file onProgress interface. interface FileMessagesWithProgressHandler, fun onProgress(bytesSent: Int, totalBytesSent: Int, totalBytesToSend: Int) is changed to fun onProgress(requestId: String, bytesSent: Int, totalBytesSent: Int, totalBytesToSend: Int)

  • Creation of Sendbird instances is no longer available in v4.

  • Separate existing Params classes such as UserMessageParams into UserMessageCreateParams and UserMessageUpdateParams as shown below.

From v3To v4

GroupChannelParams

GroupChannelCreateParams
GroupChannelUpdateParams

OpenChannelParams

OpenChannelCreateParams
OpenChannelUpdateParams

UserMessageParams

UserMessageCreateParams
UserMessageUpdateParams

FileMessageParams

FileMessageCreateParams
FileMessageUpdateParams

  • Renew the package structure for better management.

  • Replace builder classes with class constructors.

  • Change getter and setter functions to properties. For example, GroupChannelListQuery.hasNext() has changed to GroupChannelListQuery.hasNext, or GroupChannelListQuery.getHasNext() for Java.

  • Remove setter functions that return themselves. For example, GroupChannelCreateParams.setData(value): GroupChannelCreateParams has been removed and should now be set by accessing the corresponding property.

  • Change the static function OpenChannelCreateParams.clone to a non-static function OpenChannelCreateParams(instance).clone.

  • Specify nullability for return types and parameters.

  • Unify callback handlers.

  • Move nested classes to the top level. For example, com.sendbird.android.user.query.UserListQuery.UserListQueryResultHandler has changed to com.sendbird.android.handler.UserListQueryResultHandler.

  • Remove redundant suffixes such as withUserId in function names.

  • All enum.from(value:String?) functions have become internal functions.

  • List interface preferred to the MutableList interface.

Other changes

  • Remove ConnectionManager which was deprecated in v3.

  • Local caching in v4 can facilitate caching-related functionalities and more. SyncManager will soon be deprecated, so we highly recommend you use local caching instead.

  • Remove setters for Query classes and add corresponding Params classes.

  • Some methods and properties have been removed or replaced. For example, GroupChannelCreateParams.addUser and GroupChannelCreateParams.addUsers are replaced by GroupChannelCreateParams.users. You can see the full list of changes in the changelog section.


Migrating to v4

Migration from v3 to v4 can be done manually or, for Mac users, using a migration script.

Sendbird Chat SDK v4 will likely prevent your app from compiling until all migration tasks are complete and all errors are fixed. After fixing all the blocking errors, further work may be needed to remove warnings and align the updated SDK with your app. We recommend you allow a generous timeline for the task. Depending on the level of dependency, it may take a few hours to a week.

Migration Script

For Mac users, a migration script is available to provide a smoother migration experience. While not comprehensive of all changes made to v4, the script reduces a significant amount of work needed for the migration. You can check what changes the script supports or doesn't support in the changelog section.

To use the migration script, follow the instructions below.

  1. Download the migration script to the top of the project directory.

  2. Give execution permission for the script with chmod +x migration_script_v3_to_v4.sh.

  3. Run the migration script at the top of your project.

  4. After running the migration script, check the changes made to your project to prevent any unexpected errors.

Note: If you use the migration script, you can skip Step 1 through Step 3 and go directly to Step 4.

Step 1 Replace SDK import names

It's recommended to remove every import from Sendbird since classes have been repackaged in v4. Find and replace all instances of import com.sendbird.android.* with an empty string.

Step 2 Replace instances

Find and replace all instances of SendBird with SendbirdChat. To find the exact SendBird.*** calls as opposed to any word containing "Sendbird," we recommend that you use the regular expression of SendBird which is [S]end[B]ird\.. Also, find and replace all instances of SendBirdException with SendbirdException.

Step 3 Insert new imports

Remove the SDK v3 from your project and insert the following imports to every class in which the SendBird classes were used. Then, optimize your imports by using the import optimization feature provided by your IDE.

import com.sendbird.android.channel.*;
import com.sendbird.android.SendbirdChat;
import com.sendbird.android.message.*;
import com.sendbird.android.user.*;
import com.sendbird.android.handler.*;
import com.sendbird.android.channel.query.*;
import com.sendbird.android.message.query.*;
import com.sendbird.android.exception.*;

Step 4 Handle common errors

The following are manual fixes to errors that may arise when migrating to v4.

Initializing Sendbird

Note: You must initialize the SendbirdChat instance before calling any SDK interfaces.

In v3, the app was initialized using SendBird.init().

In v4, a new class called InitParams has been introduced. After creating an object from InitParams, you should pass the object to the SendbirdChat.init() function as follows.

From v3

KotlinJava
SendBird.init(APP_ID, applicationContext)

To v4

KotlinJava
val params = InitParams(APP_ID, applicationContext, false)
SendbirdChat.init(params, object : InitResultHandler {
    override fun onMigrationStarted() {}
    override fun onInitFailed(e: SendbirdException) {}
    override fun onInitSucceed() {}
})

Connecting to or disconnecting from Sendbird

In v3, ConnectHandler and DisconnectHandler were inner classes of the SendBird class.

In v4, ConnectHandler and DisconnectHandler are public classes, so you can access the classes without adding Sendbird.

Connecting to Sendbird

From v3

KotlinJava
SendBird.connect(USER_ID) { user, e ->
    // ...
}

To v4

KotlinJava
SendbirdChat.connect(USER_ID) { user, e ->
    // ...
}

Disconnecting from Sendbird

From v3

KotlinJava
SendBird.disconnect {
    // ...
}

To v4

KotlinJava
SendbirdChat.disconnect {
    // ...
}

Creating open channels and group channels

In v3, there were several functions for creating channels depending on the input parameters for both group channels and open channels. The callback handlers were also inner classes of GroupChannel and OpenChannel as shown below.

For v4, we removed all channel creation functions except GroupChannel.createChannel() for group channels and OpenChannel.createChannel() for open channels. Now you can pass all parameters via GroupChannelCreateParams and OpenChannelCreateParams. Also, CallbackHandlers has been split into GroupChannelCallbackHandler and OpenChannelCallbackHandler.

Open channels

From v3

KotlinJava
OpenChannel.createChannelWithOperatorUserIds(NAME, null, null, null) { openChannel, e ->
    // ...
}

To v4

KotlinJava
val params = OpenChannelCreateParams().apply {
    name = NAME
}
OpenChannel.createChannel(params) { openChannel, e ->
    // ...
}

Group channels

From v3

KotlinJava
GroupChannel.createChannelWithUserIds(USER_IDS, DISTINCT) { groupChannel, e ->
    // ...
}

To v4

KotlinJava
val params = GroupChannelCreateParams().apply {
    userIds = USER_IDS
    isDistinct = DISTINCT
}
GroupChannel.createChannel(params) { groupChannel, e ->
    // ...
}

Subscribing to channel handler

In v3, the ChannelHandler class was an inner class of the SendBird class and worked for both group channels and open channels.

In v4, the ChannelHandler class is divided in two classes: GroupChannelHandler for group channels and OpenChannelHandler for open channels.

From v3

KotlinJava
SendBird.addChannelHandler(UNIQUE_HANDLER_ID, object : ChannelHandler() {
    // ...
})

To v4

KotlinJava
// Group channel event handlers
addChannelHandler(UNIQUE_HANDLER_ID, object : GroupChannelHandler() {
    // You can override functions here.
})

// Open channel event handlers
addChannelHandler(UNIQUE_HANDLER_ID, object : OpenChannelHandler() {
    // You can override functions here.
})

Retrieving channels

In v3, you could retrieve channel objects via the channel URL and by refreshing the channel object.

In v4, to retrieve group channels, use GroupChannelCallbackHandler instead of GroupChannel.GroupChannelGetHandler and CompletionHandler instead of GroupChannel.GroupChannelRefreshHandler.

From v3

KotlinJava
GroupChannel.getChannel(CHANNEL_URL) { groupChannel, e ->
    // ...
}

// ...

groupChannel.refresh {
    // ...
}

To v4

KotlinJava
GroupChannel.getChannel(CHANNEL_URL) { groupChannel, e ->
    // ...
}

// ...

groupChannel.refresh {
    // ...
}

To retrieve open channels, use OpenChannelCallbackHandler instead of OpenChannel.OpenChannelGetHandler.

From v3

KotlinJava
OpenChannel.getChannel(CHANNEL_URL) { openChannel, e ->
    // ...
}

To v4

KotlinJava
OpenChannel.getChannel(CHANNEL_URL) { openChannel, e ->
    // ...
}

Retrieving messages

In v3, you needed to pass all individual parameters into specific functions to retrieve messages from a group channel.

In v4, you need to pass MessageListParams to functions instead of all individual parameters. The callback handler has also changed, so you should use BaseMessagesHandler instead of BaseChannel.GetMessagesHandler.

From v3

KotlinJava
groupChannel.getPreviousMessagesByTimestamp(OLDEST_MESSAGE_CREATED_AT, false, LIMIT, true, BaseChannel.MessageTypeFilter.ALL, null) { list, e ->
    // ...
}

To v4

KotlinJava
val params = MessageListParams().apply {
    previousResultSize = LIMIT
    reverse = false
    messageTypeFilter = MessageTypeFilter.ALL
}
groupChannel.getMessagesByTimestamp(OLDEST_MESSAGE_CREATED_AT, params) { list, e ->
    // ...
}

Sending messages

In v3, there were several ways to send messages. BaseChannel.SendUserMessageHandler was used for sending UserMessage and BaseChannel.UpdateUserMessageHandler was used for updating UserMessage.

In v4, the two callback handlers have been merged into UserMessageHandler which can be used for both sending and updating UserMessage.

From v3

KotlinJava
// Send text message
val tempUserMessage: UserMessage = groupChannel.sendUserMessage(TEXT) { userMessage, e ->
    // ...
}

// Send text message with UserMessageParams.
val params = UserMessageParams().apply {
    setMessage(TEXT)
    setCustomType(CUSTOM_TYPE)
}
val tempUserMessage = groupChannel.sendUserMessage(params) { userMessage, e ->
    // ...
}

// Update UserMessage
groupChannel.updateUserMessage(message.getMessageId(), EDITED_TEXT, null, null) { userMessage, e ->
    // ...
}

To v4

KotlinJava
// Send text message
val tempUserMessage: UserMessage = groupChannel.sendUserMessage(TEXT) { userMessage, e ->
    // ...
}

// Send text message with UserMessageCreateParams.
val params = UserMessageCreateParams().apply {
    message = TEXT
    customType = CUSTOM_TYPE
}
val tempUserMessage = groupChannel.sendUserMessage(params) { userMessage, e ->
    // ...
}

// Update UserMessage
val params = UserMessageUpdateParams().apply {
    message = EDITED_TEXT
}
groupChannel.updateUserMessage(message.getMessageId(), params) { userMessage, e ->
    // ...
}

As for FileMessage, the callback handlers BaseChannel.SendFileMessageHandler and BaseChannel.UpdateFileMessageHandler have been merged to FileMessageHandler which can be used for sending and updating FileMessages.

From v3

KotlinJava
val params = FileMessageParams().apply {
    setFile(FILE)
    setFileName(NAME)
    setMimeType(MIME)
    setFileSize(SIZE)
    setThumbnailSizes(THUMBNAIL_SIZES)
}

// Send image with specified thumbnail dimensions.
val tempFileMessage: FileMessage? = groupChannel.sendFileMessage(params) { message, e ->
    // ...
}

To v4

KotlinJava
val params = FileMessageCreateParams().apply {
    file = FILE
    fileName = NAME
    mimeType = MIME
    fileSize = SIZE
    thumbnailSizes = THUMBNAIL_SIZES
}

// Send image with specified thumbnail dimensions.
val tempFileMessage: FileMessage? = groupChannel.sendFileMessage(params) { fileMessage, e ->
    // ...
}

To delete a message, use CompletionHandler instead of BaseChannel.DeleteMessageHandler.

To v4

KotlinJava
groupChannel.deleteMessage(MESSAGE) {
    // ...
}

Note: These changes to sending, updating, or deleting UserMessages and FileMessages apply in the same way to open channels.

Entering and exiting open channels

In v4, you should use CompletionHandler instead of OpenChannel.OpenChannelEnterHandler() to enter an open channel and OpenChannelExitHandler to exit an open channel.

To v4

KotlinJava
// Enter an open channel.
openChannel.enter {
    // ...
}

// Exit an open channel.
openChannel.exit {
    // ...
}

Functions in need of handlers

Push preferences

In v3, a true or false value was used to set push preferences for a channel.

In v4, the PushTriggerOption should be set to one of the following four values: ALL, OFF, MENTION_ONLY, and DEFAULT.

From v3

KotlinJava
groupChannel.setPushPreference(on) {
    // ...
}
val pushCurrentlyEnabled: Boolean = groupChannel.isPushEnabled

To v4

KotlinJava
groupChannel.setMyPushTriggerOption(GroupChannel.PushTriggerOption.MENTION_ONLY) {
    // ...
}
val options: GroupChannel.PushTriggerOption = groupChannel.myPushTriggerOption

Mark as read and mark as delivered

You should pass CompletionHandler to groupChannel.markAsRead() and pass the data that you receive from Firebase Cloud Messaging (FCM) push notifications to SendbirdChat.markAsDelivered().

To v4

KotlinJava
groupChannel.markAsRead {
    // ...
}
SendbirdChat.markAsDelivered(remoteMessage.getData())

Unread member count and undelivered member count

channel.getReadReceipt() and channel.getDeliveryReceipt() functions have been renamed as the following in v4.

To v4

KotlinJava
groupChannel.getUnreadMemberCount(MESSAGE)
groupChannel.getUndeliveredMemberCount(MESSAGE)

Changelog

Changes supported by the migration script

From v3To v4

com.sendbird.android.SendBird

com.sendbird.android.SendbirdChat

com.sendbird.android.BaseChannel

com.sendbird.android.channel.BaseChannel

com.sendbird.android.GroupChannel

com.sendbird.android.channel.GroupChannel

com.sendbird.android.OpenChannel

com.sendbird.android.channel.OpenChannel

com.sendbird.android.ReadStatus

com.sendbird.android.channel.ReadStatus

com.sendbird.android.Member.Role

com.sendbird.android.channel.Role

com.sendbird.android.GroupChannelListQuery

com.sendbird.android.channel.query.GroupChannelListQuery

com.sendbird.android.OpenChannelListQuery

com.sendbird.android.channel.query.OpenChannelListQuery

com.sendbird.android.PublicGroupChannelListQuery

com.sendbird.android.channel.query.PublicGroupChannelListQuery

com.sendbird.android.BaseCollection

com.sendbird.android.collection.BaseCollection

com.sendbird.android.handlers.CollectionEventSource

com.sendbird.android.collection.CollectionEventSource

com.sendbird.android.CollectionLifecycle

com.sendbird.android.collection.CollectionLifecycle

com.sendbird.android.GroupChannelCollection

com.sendbird.android.collection.GroupChannelCollection

com.sendbird.android.handlers.GroupChannelContext

com.sendbird.android.collection.GroupChannelContext

com.sendbird.android.MessageCollection

com.sendbird.android.collection.MessageCollection

com.sendbird.android.handlers.MessageCollectionInitPolicy

com.sendbird.android.collection.MessageCollectionInitPolicy

com.sendbird.android.handlers.MessageContext

com.sendbird.android.collection.MessageContext

com.sendbird.android.handlers.Traceable

com.sendbird.android.collection.Traceable

com.sendbird.android.SendBirdDBException

com.sendbird.android.exception.SendbirdDBException

com.sendbird.android.SendBirdError

com.sendbird.android.exception.SendbirdError

com.sendbird.android.SendBirdException

com.sendbird.android.exception.SendbirdException

com.sendbird.android.AdminMessage

com.sendbird.android.message.AdminMessage

com.sendbird.android.AppleCriticalAlertOptions

com.sendbird.android.message.AppleCriticalAlertOptions

com.sendbird.android.BaseMessage

com.sendbird.android.message.BaseMessage

com.sendbird.android.Emoji

com.sendbird.android.message.Emoji

com.sendbird.android.EmojiCategory

com.sendbird.android.message.EmojiCategory

com.sendbird.android.EmojiContainer

com.sendbird.android.message.EmojiContainer

com.sendbird.android.FileMessage

com.sendbird.android.message.FileMessage

com.sendbird.android.MentionType

com.sendbird.android.message.MentionType

com.sendbird.android.MessageMetaArray

com.sendbird.android.message.MessageMetaArray

com.sendbird.android.OGImage

com.sendbird.android.message.OGImage

com.sendbird.android.OGMetaData

com.sendbird.android.message.OGMetaData

com.sendbird.android.Plugin

com.sendbird.android.message.Plugin

com.sendbird.android.PushNotificationDeliveryOption

com.sendbird.android.message.PushNotificationDeliveryOption

com.sendbird.android.Reaction

com.sendbird.android.message.Reaction

com.sendbird.android.ReactionEvent

com.sendbird.android.message.ReactionEvent

com.sendbird.android.ReplyTypeFilter

com.sendbird.android.message.ReplyType

com.sendbird.android.ThreadInfo

com.sendbird.android.message.ThreadInfo

com.sendbird.android.ThreadInfoUpdateEvent

com.sendbird.android.message.ThreadInfoUpdateEvent

com.sendbird.android.UserMessage

com.sendbird.android.message.UserMessage

com.sendbird.android.MessageSearchQuery

com.sendbird.android.message.query.MessageSearchQuery

com.sendbird.android.PreviousMessageListQuery

com.sendbird.android.message.query.PreviousMessageListQuery

com.sendbird.android.AbstractPushHandler

com.sendbird.android.push.AbstractPushHandler

com.sendbird.android.OnPushTokenReceiveListener

com.sendbird.android.push.OnPushTokenReceiveListener

com.sendbird.android.SendBirdFirebaseInstanceIDService

com.sendbird.android.push.SendbirdFirebaseInstanceIDService

com.sendbird.android.SendBirdFirebaseMessagingService

com.sendbird.android.push.SendbirdFirebaseMessagingService

com.sendbird.android.SendBirdHmsMessagingService

com.sendbird.android.push.SendbirdHmsMessagingService

com.sendbird.android.SendBirdHmsPushHandler

com.sendbird.android.push.SendbirdHmsPushHandler

com.sendbird.android.SendBirdPushHandler

com.sendbird.android.push.SendbirdPushHandler

com.sendbird.android.SendBirdPushHelper

com.sendbird.android.push.SendbirdPushHelper

com.sendbird.android.Member

com.sendbird.android.user.Member

com.sendbird.android.RestrictionType

com.sendbird.android.user.RestrictionType

com.sendbird.android.RestrictedUser

com.sendbird.android.user.RestrictedUser

com.sendbird.android.RestrictionInfo

com.sendbird.android.user.RestrictionInfo

com.sendbird.android.Sender

com.sendbird.android.user.Sender

com.sendbird.android.User

com.sendbird.android.user.User

com.sendbird.android.ApplicationUserListQuery

com.sendbird.android.user.query.ApplicationUserListQuery

com.sendbird.android.BannedUserListQuery

com.sendbird.android.user.query.BannedUserListQuery

com.sendbird.android.BlockedUserListQuery

com.sendbird.android.user.query.BlockedUserListQuery

com.sendbird.android.FriendListQuery

com.sendbird.android.user.query.FriendListQuery

com.sendbird.android.GroupChannelMemberListQuery

com.sendbird.android.user.query.GroupChannelMemberListQuery

com.sendbird.android.MutedUserListQuery

com.sendbird.android.user.query.MutedUserListQuery

com.sendbird.android.OperatorListQuery

com.sendbird.android.user.query.OperatorListQuery

com.sendbird.android.ParticipantListQuery

com.sendbird.android.user.query.ParticipantListQuery

com.sendbird.android.UserListQuery

com.sendbird.android.user.query.UserListQuery

com.sendbird.android.MessagePayloadFilter

com.sendbird.android.params.common.MessagePayloadFilter

com.sendbird.android.BaseMessageListParams

com.sendbird.android.params.BaseMessageListParams

com.sendbird.android.GroupChannelChangeLogsParams

com.sendbird.android.params.GroupChannelChangeLogsParams

com.sendbird.android.GroupChannelTotalUnreadChannelCountParams

com.sendbird.android.params.GroupChannelTotalUnreadChannelCountParams

com.sendbird.android.GroupChannelTotalUnreadMessageCountParams

com.sendbird.android.params.GroupChannelTotalUnreadMessageCountParams

com.sendbird.android.MessageChangeLogsParams

com.sendbird.android.params.MessageChangeLogsParams

com.sendbird.android.MessageListParams

com.sendbird.android.params.MessageListParams

com.sendbird.android.MessageRetrievalParams

com.sendbird.android.params.MessageRetrievalParams

com.sendbird.android.ThreadMessageListParams

com.sendbird.android.params.ThreadMessageListParams

com.sendbird.android.SendBird.ThreadOption

com.sendbird.android.ThreadOption

com.sendbird.android.GroupChannel.UnreadItemKey

com.sendbird.android.UnreadItemKey

com.sendbird.android.SendBird.GetAllEmojiHandler

com.sendbird.android.handler.AllEmojiHandler

com.sendbird.android.handlers.MessageCollectionHandler

com.sendbird.android.handler.MessageCollectionHandler

com.sendbird.android.handlers.MessageCollectionInitHandler

com.sendbird.android.handler.MessageCollectionInitHandler

com.sendbird.android.BaseChannel.MessageMetaArrayHandler

com.sendbird.android.handler.BaseMessageHandler

com.sendbird.android.BaseMessage.GetMessageHandler

com.sendbird.android.handler.BaseMessageHandler

com.sendbird.android.BaseChannel.MetaCounterHandler

com.sendbird.android.handler.MetaCounterHandler

com.sendbird.android.BaseChannel.GetMessagesHandler

com.sendbird.android.handler.BaseMessagesHandler

com.sendbird.android.MessageSearchQuery.MessageSearchQueryResultHandler

com.sendbird.android.handler.BaseMessagesHandler

com.sendbird.android.PreviousMessageListQuery.MessageListQueryResult

com.sendbird.android.handler.BaseMessagesHandler

com.sendbird.android.BaseChannel.MetaDataHandler

com.sendbird.android.handler.MetaDataHandler

com.sendbird.android.User.MetaDataHandler

com.sendbird.android.handler.MetaDataHandler

com.sendbird.android.handlers.ChannelChangeLogsHandler

com.sendbird.android.handler.ChannelChangeLogsHandler

SendBird.updateCurrentUserInfoWithProfileImage

SendbirdChat.updateCurrentUserInfo

com.sendbird.android.SendBird.ConnectionState

com.sendbird.android.ConnectionState

SendBird.registerPushTokenForCurrentUser

SendbirdChat.registerPushToken

SendBird.unregisterPushTokenForCurrentUser

SendbirdChat.unregisterPushToken

SendBird.unregisterPushTokenAllForCurrentUser

SendbirdChat.unregisterPushTokenAll

SendBird.getMyGroupChannelChangeLogsByTokenWithParams

SendbirdChat.getMyGroupChannelChangeLogsByToken

SendBird.getMyGroupChannelChangeLogsByTimestampWithParams

SendbirdChat.getMyGroupChannelChangeLogsByTimestamp

GroupChannel.inviteWithUserId

GroupChannel.invite

GroupChannel.banUserWithUserId

SendbirdChat.banUser

GroupChannel.unbanUserWithUserId

SendbirdChat.unbanUser

GroupChannel.muteUserWithUserId

SendbirdChat.muteUser

GroupChannel.unmuteUserWithUserId

SendbirdChat.unmuteUser

SendBird.blockUserWithUserId

SendbirdChat.blockUser

SendBird.unblockUserWithUserId

SendbirdChat.unblockUser

OpenChannel.isOperatorWithUserId

SendbirdChat.isOperator

SendBird.markAsReadWithChannelUrls

SendbirdChat.markAsRead

com.sendbird.android.BaseChannel.CopyFileMessageHandler
com.sendbird.android.BaseChannel.ResendFileMessageHandler
com.sendbird.android.BaseChannel.SendFileMessageHandler
com.sendbird.android.BaseChannel.UpdateFileMessageHandler

FileMessageHandler

com.sendbird.android.BaseChannel.CopyUserMessageHandler
com.sendbird.android.BaseChannel.ResendUserMessageHandler
com.sendbird.android.BaseChannel.SendUserMessageHandler
com.sendbird.android.BaseChannel.TranslateUserMessageHandler
com.sendbird.android.BaseChannel.UpdateUserMessageHandler

UserMessageHandler

com.sendbird.android.BaseChannel.DeleteMessageHandler
com.sendbird.android.BaseChannel.DeleteMetaCounterHandler
com.sendbird.android.BaseChannel.DeleteMetaDataHandler
com.sendbird.android.BaseChannel.ReportHandler
com.sendbird.android.BaseChannel.ReportMessageHandler
com.sendbird.android.BaseChannel.ReportUserHandler
com.sendbird.android.GroupChannel.GroupChannelAcceptInvitationHandler
com.sendbird.android.GroupChannel.GroupChannelBanHandler
com.sendbird.android.GroupChannel.GroupChannelDeclineInvitationHandler
com.sendbird.android.GroupChannel.GroupChannelDeleteHandler
com.sendbird.android.GroupChannel.GroupChannelFreezeHandler
com.sendbird.android.GroupChannel.GroupChannelHideHandler
com.sendbird.android.GroupChannel.GroupChannelInviteHandler
com.sendbird.android.GroupChannel.GroupChannelJoinHandler
com.sendbird.android.GroupChannel.GroupChannelLeaveHandler
com.sendbird.android.GroupChannel.GroupChannelMuteHandler
com.sendbird.android.GroupChannel.GroupChannelRefreshHandler
com.sendbird.android.GroupChannel.GroupChannelResetMyHistoryHandler
com.sendbird.android.GroupChannel.GroupChannelSetMyCountPreferenceHandler
com.sendbird.android.GroupChannel.GroupChannelSetMyPushTriggerOptionHandler
com.sendbird.android.GroupChannel.GroupChannelSetPushPreferenceHandler
com.sendbird.android.GroupChannel.GroupChannelUnbanHandler
com.sendbird.android.GroupChannel.GroupChannelUnfreezeHandler
com.sendbird.android.GroupChannel.GroupChannelUnhideHandler
com.sendbird.android.GroupChannel.GroupChannelUnmuteHandler
com.sendbird.android.OpenChannel.OpenChannelBanHandler
com.sendbird.android.OpenChannel.OpenChannelDeleteHandler
com.sendbird.android.OpenChannel.OpenChannelEnterHandler
com.sendbird.android.OpenChannel.OpenChannelExitHandler
com.sendbird.android.OpenChannel.OpenChannelMuteHandler
com.sendbird.android.OpenChannel.OpenChannelRefreshHandler
com.sendbird.android.OpenChannel.OpenChannelUnbanHandler
com.sendbird.android.OpenChannel.OpenChannelUnmuteHandler
com.sendbird.android.SendBird.DeleteFriendDiscoveriesHandler
com.sendbird.android.SendBird.DeleteFriendDiscoveryHandler
com.sendbird.android.SendBird.DeleteFriendHandler
com.sendbird.android.SendBird.DeleteFriendsHandler
com.sendbird.android.SendBird.MarkAsReadHandler
com.sendbird.android.SendBird.SetChannelInvitationPreferenceHandler
com.sendbird.android.SendBird.SetDoNotDisturbHandler
com.sendbird.android.SendBird.SetPushSoundHandler
com.sendbird.android.SendBird.SetPushTemplateHandler
com.sendbird.android.SendBird.SetPushTriggerOptionHandler
com.sendbird.android.SendBird.SetSnoozePeriodHandler
com.sendbird.android.SendBird.UnregisterPushTokenHandler
com.sendbird.android.SendBird.UploadFriendDiscoveriesHandler
com.sendbird.android.SendBird.UserInfoUpdateHandler
com.sendbird.android.SendBird.UserUnblockHandler
com.sendbird.android.User.DeleteMetaDataHandler
com.sendbird.android.handlers.AddOperatorsHandler
com.sendbird.android.handlers.AllowFriendDiscoveryHandler

CompletionHandler

com.sendbird.android.BaseChannel.GetMessagesHandler
com.sendbird.android.MessageSearchQuery.MessageSearchQueryResultHandler

BaseMessagesHandler

com.sendbird.android.BaseChannel.MessageMetaArrayHandler
com.sendbird.android.BaseMessage.GetMessageHandler

BaseMessageHandler

com.sendbird.android.BaseChannel.ResendFileMessageWithProgressHandler
com.sendbird.android.BaseChannel.SendFileMessageWithProgressHandler

FileMessageWithProgressHandler

com.sendbird.android.BaseChannel.SendFileMessagesHandler

FileMessagesHandler

com.sendbird.android.BaseChannel.SendFileMessagesWithProgressHandler

FileMessagesWithProgressHandler

com/sendbird/android/GroupChannel.GroupChannelTotalUnreadChannelCountHandler
com/sendbird/android/GroupChannel.GroupChannelTotalUnreadMessageCountHandler

CountHandler

com.sendbird.android.GroupChannel.GroupChannelCreateHandler
com.sendbird.android.GroupChannel.GroupChannelGetHandler
com.sendbird.android.GroupChannel.GroupChannelUpdateHandler

GroupChannelCallbackHandler

com.sendbird.android.OpenChannel.OpenChannelCreateHandler
com.sendbird.android.OpenChannel.OpenChannelGetHandler
com.sendbird.android.OpenChannel.OpenChannelUpdateHandler

OpenChannelCallbackHandler

com.sendbird.android.OperatorListQuery.OperatorListQueryResultHandler
com.sendbird.android.SendBird.AddFriendsHandler

UsersHandler

com.sendbird.android.SendBird.UserBlockHandler

UserHandler

com.sendbird.android.BaseChannel.ReactionHandler

com.sendbird.android.handler.ReactionHandler

com.sendbird.android.BaseMessage.GetThreadedMessagesHandler

com.sendbird.android.handler.GetThreadedMessagesHandler

com.sendbird.android.GroupChannel.GroupChannelCreateDistinctChannelIfNotExistHandler

com.sendbird.android.handler.GroupChannelCreateDistinctChannelIfNotExistHandler

com.sendbird.android.GroupChannel.GroupChannelGetMyPushTriggerOptionHandler

com.sendbird.android.handler.GroupChannelGetMyPushTriggerOptionHandler

com.sendbird.android.SendBird.ConnectHandler

com.sendbird.android.handler.ConnectHandler

com.sendbird.android.SendBird.ConnectionHandler

com.sendbird.android.handler.ConnectionHandler

com.sendbird.android.SendBird.DisconnectHandler

com.sendbird.android.handler.DisconnectHandler

com.sendbird.android.SendBird.UserEventHandler

com.sendbird.android.handler.UserEventHandler

com.sendbird.android.handlers.ChannelChangeLogsHandler

com.sendbird.android.handler.ChannelChangeLogsHandler

com.sendbird.android.handlers.RemoveFailedMessagesHandler

com.sendbird.android.handler.RemoveFailedMessagesHandler

com.sendbird.android.handlers.CompletionHandler

com.sendbird.android.handler.CompletionHandler

com.sendbird.android.handlers.GroupChannelCollectionHandler

com.sendbird.android.handler.GroupChannelCollectionHandler

com.sendbird.android.handlers.InitResultHandler

com.sendbird.android.handler.InitResultHandler

com.sendbird.android.handlers.MessageChangeLogsHandler

com.sendbird.android.handler.MessageChangeLogsHandler

com.sendbird.android.handlers.OnChannelLoadResultHandler

com.sendbird.android.handler.OnChannelLoadResultHandler

com.sendbird.android.handlers.GetAllowFriendDiscoveryHandler

com.sendbird.android.handler.GetAllowFriendDiscoveryHandler

com.sendbird.android.SendBird.GetAllEmojiHandler

com.sendbird.android.handler.AllEmojiHandler

com.sendbird.android.SendBird.GetChannelInvitationPreferenceHandler

com.sendbird.android.handler.ChannelInvitationPreferenceHandler

com.sendbird.android.SendBird.GetDoNotDisturbHandler

com.sendbird.android.handler.DoNotDisturbHandler

com.sendbird.android.SendBird.GetEmojiCategoryHandler

com.sendbird.android.handler.EmojiCategoryHandler

com.sendbird.android.SendBird.GetEmojiHandler

com.sendbird.android.handler.EmojiHandler

com.sendbird.android.SendBird.GetFriendChangeLogsByTokenHandler

com.sendbird.android.handler.FriendChangeLogsByTokenHandler

com.sendbird.android.SendBird.GetMyGroupChannelChangeLogsHandler

com.sendbird.android.handler.MyGroupChannelChangeLogsHandler

com.sendbird.android.SendBird.GetPushSoundHandler

com.sendbird.android.handler.PushSoundHandler

com.sendbird.android.SendBird.GetPushTemplateHandler

com.sendbird.android.handler.PushTemplateHandler

com.sendbird.android.SendBird.GetPushTokensHandler

com.sendbird.android.handler.PushTokensHandler

com.sendbird.android.SendBird.GetPushTriggerOptionHandler

com.sendbird.android.handler.PushTriggerOptionHandler

com.sendbird.android.SendBird.GetSnoozePeriodHandler

com.sendbird.android.handler.SnoozePeriodHandler

com.sendbird.android.SendBird.RegisterPushTokenWithStatusHandler

com.sendbird.android.handler.PushTokenWithStatusHandler

com.sendbird.android.BaseChannel.GetMyMutedInfoHandler

com.sendbird.android.handler.MyMutedInfoHandler

com.sendbird.android.SendBird.PushTokenType

com.sendbird.android.push.PushTokenType

com.sendbird.android.SendBird.PushTokenRegistrationStatus

com.sendbird.android.push.PushTokenRegistrationStatus

com.sendbird.android.SendBird.GetMyGroupChannelChangeLogsHandler

com.sendbird.android.handler.GroupChannelChangeLogsHandler

com.sendbird.android.BaseChannel.ReportCategory

com.sendbird.android.channel.ReportCategory

com.sendbird.android.BaseChannel.MessageTypeFilter

com.sendbird.android.channel.MessageTypeFilter

com.sendbird.android.GroupChannel.HiddenState

com.sendbird.android.channel.HiddenState

com.sendbird.android.GroupChannel.CountPreference

com.sendbird.android.channel.CountPreference

com.sendbird.android.GroupChannel.ChannelType

com.sendbird.android.channel.ChannelType

com.sendbird.android.GroupChannel.GroupChannelChannelCountHandler

com.sendbird.android.handler.CountHandler

com.sendbird.android.BaseMessage.SendingStatus

com.sendbird.android.message.SendingStatus

com.sendbird.android.BaseMessage.GetThreadedMessagesHandler

com.sendbird.android.handler.ThreadedMessagesHandler

com.sendbird.android.FileMessage.Thumbnail

com.sendbird.android.message.Thumbnail

com.sendbird.android.FileMessage.ThumbnailSize

com.sendbird.android.message.ThumbnailSize

com.sendbird.android.handlers.OnChannelLoadResultHandler

com.sendbird.android.handler.GroupChannelsCallbackHandler

com.sendbird.android.Member.MutedState

com.sendbird.android.user.MutedState

com.sendbird.android.Member.MemberState

com.sendbird.android.user.MemberState

com.sendbird.android.ReactionEvent.ReactionEventAction

com.sendbird.android.message.ReactionEventAction

com.sendbird.android.SendBirdPushHelper.OnPushRequestCompleteListener

com.sendbird.android.handler.PushRequestCompleteHandler

com.sendbird.android.GroupChannelMemberListQuery.OperatorFilter

com.sendbird.android.user.query.OperatorFilter

com.sendbird.android.GroupChannelMemberListQuery.MutedMemberFilter

com.sendbird.android.user.query.MutedMemberFilter

com.sendbird.android.GroupChannelMemberListQuery.MemberStateFilter

com.sendbird.android.user.query.MemberStateFilter

com.sendbird.android.GroupChannelMemberListQuery.GroupChannelMemberListQueryResultHandler

com.sendbird.android.handler.MembersHandler

com.sendbird.android.GroupChannelListQuery.QueryType

com.sendbird.android.channel.query.QueryType

com.sendbird.android.GroupChannelListQuery.MemberStateFilter

com.sendbird.android.channel.query.MyMemberStateFilter

com.sendbird.android.GroupChannelListQuery.SuperChannelFilter

com.sendbird.android.channel.SuperChannelFilter

com.sendbird.android.GroupChannelListQuery.PublicChannelFilter

com.sendbird.android.channel.query.PublicChannelFilter

com.sendbird.android.GroupChannelListQuery.UnreadChannelFilter

com.sendbird.android.channel.query.UnreadChannelFilter

com.sendbird.android.GroupChannelListQuery.HiddenChannelFilter

com.sendbird.android.channel.query.HiddenChannelFilter

com.sendbird.android.GroupChannelListQuery.SearchField

com.sendbird.android.channel.query.SearchField

com.sendbird.android.GroupChannelListQuery.GroupChannelListQueryResultHandler
com.sendbird.android.PublicGroupChannelListQuery.PublicGroupChannelListQueryResultHandler

com.sendbird.android.handler.GroupChannelsCallbackHandler

com.sendbird.android.PublicGroupChannelListQuery.SuperChannelFilter

com.sendbird.android.channel.SuperChannelFilter

com.sendbird.android.PublicGroupChannelListQuery.MembershipFilter

com.sendbird.android.channel.query.MembershipFilter

com.sendbird.android.OpenChannelListQuery.OpenChannelListQueryResultHandler

com.sendbird.android.handler.OpenChannelsCallbackHandler

com.sendbird.android.GroupChannelListQuery.Order
com.sendbird.android.PublicGroupChannelListQuery.Order

com.sendbird.android.channel.query.GroupChannelListQueryOrder

com.sendbird.android.GroupChannelMemberListQuery

com.sendbird.android.user.query.MemberListQuery

Changes not supported by the migration script

From v3To v4

com.sendbird.android.SendBird.ChannelHandler

com.sendbird.android.handler.BaseChannelHandler
com.sendbird.android.handler.GroupChannelHandler
com.sendbird.android.handler.OpenChannelHandler

BaseMessageListParams.messageType

BaseMessageListParams.messageTypeFilter

BaseMessage.requestedMentionUserIds

BaseMessage.params.mentionedUserIds

com.sendbird.android.handler.UnreadCountHandler|``com.sendbird.android.handler.CountHandler

ExtensionFrom.from(String)
PushTokenType.from(String)
PushTriggerOption.from(String)
SortOrder.from(String)
UnreadItemKey.from(String)
ChannelType.fromValue(String)
MessageTypeFilter.from(String)
ReportCategory.from(String)
CountPreference.from(String)
HiddenState.from(String)
PushTriggerOption.from(String)
Role.from(String)
SuperChannelFilter.from(String)
MemberStateFilter.from(String)
PublicChannelFilter.from(String)
UnreadChannelFilter.from(String)
SendingStatus.from(String)
MentionType.from(String)
PushNotificationDeliveryOption.from(String)
ReplyTypeFilter.from(String)
ScheduledUserMessage.Status.from(String)
MessageSearchQuery.Order.fromValue(String)
MemberState.from(String)
MutedState.from(String)
RestrictionType.from(String)

Removed

AppInfo.useReaction()

Kotlin: AppInfo.useReaction
Java: AppInfo.getUseReaction()

SendBird.getOSVersion()

Kotlin: SendbirdChat.osVersion
Java: SendbirdChat.getOsVersion()

SendbirdChat.getSDKVersion()

Kotlin: SendbirdChat.sdkVersion
Java: SendbirdChat.getSdkVersion()

SendbirdChat.getEkey()

Kotlin: SendbirdChat.eKey
Java: SendbirdChat.getEKey()

GroupChannelListQuery.hasNext()

Kotlin: GroupChannelListQuery.hasNext
Java: GroupChannelListQuery.getHasNext()

OpenChannelListQuery.hasNext()

Kotlin: OpenChannelListQuery.hasNext
Java: OpenChannelListQuery.getHasNext()

PublicGroupChannelListQuery.hasNext()

Kotlin: PublicGroupChannelListQuery.hasNext
Java: PublicGroupChannelListQuery.getHasNext()

GroupChannelCollection.hasNext()

Kotlin: GroupChannelCollection.hasNext
Java: GroupChannelCollection.getHasNext()

MessageCollection.hasNext()

Kotlin: MessageCollection.hasNext
Java: MessageCollection.getHasNext()

ThreadInfoUpdateEvent.hasNext()

Kotlin: ThreadInfoUpdateEvent.hasNext
Java: ThreadInfoUpdateEvent.getHasNext()

FriendListQuery.hasNext()

Kotlin: FriendListQuery.hasNext
Java: FriendListQuery.getHasNext()

GroupChannelMemberListQuery.hasNext()

Kotlin: GroupChannelMemberListQuery.hasNext
Java: GroupChannelMemberListQuery.getHasNext()

OperatorListQuery.hasNext()

Kotlin: OperatorListQuery.hasNext
Java: OperatorListQuery.getHasNext()

MessageCollection.hasPrevious()

Kotlin: MessageCollection.hasPrevious
Java: MessageCollection.getHasPrevious()

OGMetaData.getOGImage()

Kotlin: OGMetaData.ogImage
Java: OGMetaData.getOgImage()

PreviousMessageListQuery.shouldShowSubchannelMessagesOnly()

Kotlin: PreviousMessageListQuery.showSubchannelMessagesOnly
Java: PreviousMessageListQuery.getShowSubchannelMessagesOnly()

BaseMessageListParams.shouldReverse()

Kotlin: BaseMessageListParams.reverse
Java: BaseMessageListParams.getReverse()

PreviousMessageListQuery.shouldReverse()

Kotlin: PreviousMessageListQuery.reverse
Java: PreviousMessageListQuery.getReverse()

OpenChannelListQuery.customType

OpenChannelListQuery.customTypeFilter

BaseMessage.messageParams

BaseMessage.messageCreateParams

MessageSearchQuery.isReverse

MessageSearchQuery.reverse

MessageSearchQuery.isExactMatch

MessageSearchQuery.exactMatch

BaseMessageListParams.isInclusive

BaseMessageListParams.inclusive

OpenChannelCreateParams.clone

OpenChannelCreateParams(instance).clone

com.sendbird.android.UserListQuery.UserListQueryResultHandler

com.sendbird.android.handler.UserListQuery.UserListQueryResultHandler

PreviousMessageListQuery.shouldIncludeMetaArray()

PreviousMessageListQuery.messagePayloadFilter.includeMetaArray

PreviousMessageListQuery.shouldIncludeReactions()

PreviousMessageListQuery.messagePayloadFilter.includeReactions

PreviousMessageListQuery.shouldIncludePollDetails()

PreviousMessageListQuery.messagePayloadFilter.includePollDetails

PreviousMessageListQuery.isIncludeThreadInfo()

PreviousMessageListQuery.messagePayloadFilter.includeThreadInfo

PreviousMessageListQuery.setIncludeMetaArray(value)
PreviousMessageListQuery.setIncludePollDetails(value)
PreviousMessageListQuery.setIncludeReactions(value)
PreviousMessageListQuery.setIncludeThreadInfo(value)

PreviousMessageListQuery.messagePayloadFilter = value

PreviousMessageListQuery.getCustomTypeFilter()

PreviousMessageListQuery.getCustomTypesFilter()

PreviousMessageListQuery.setCustomTypeFilter(value)

PreviousMessageListQuery.setCustomTypesFilter()

GroupChannelChangeLogsParams.shouldIncludeEmpty()

Kotlin: GroupChannelChangeLogsParams.includeEmpty
Java: GroupChannelChangeLogsParams.getIncludeEmpty()

GroupChannelChangeLogsParams.shouldIncludeFrozen()

Kotlin: GroupChannelChangeLogsParams.includeFrozen
Java: GroupChannelChangeLogsParams.getIncludeEmpty()

GroupChannelCreateParams.addUser
GroupChannelCreateParams.addUsers

GroupChannelCreateParams.users

GroupChannelCreateParams.addUserId
GroupChannelCreateParams.addUserIds

GroupChannelCreateParams.userIds

MessagePayloadFilter.shouldIncludeMetaArray

MessagePayloadFilter.includeMetaArray

MessagePayloadFilter.shouldIncludeParentMessageInfo

MessagePayloadFilter.includeParentMessageInfo

MessagePayloadFilter.shouldIncludePollDetails

MessagePayloadFilter.includePollDetails

MessagePayloadFilter.shouldIncludeReactions

MessagePayloadFilter.includeReactions

MessagePayloadFilter.shouldIncludeThreadInfo

MessagePayloadFilter.includeThreadInfo

MessagePayloadFilter.Builder

Removed

BaseMessageUpdateParams.set*()
UserMessageUpdateParams.set*()
BaseMessageUpdateParams.set*()
BaseMessageCreateParams.set*()
UserMessageCreateParams.set*()
FileMessageCreateParams.set
GroupChannelCreateParams.set*()
GroupChannelUpdateParams.set*()
MessageCollectionCreateParams.set*()
MessageListParams.set*()
MessageSearchQueryParams.set*()
OpenChannelCreateParams.set*()
UserUpdateParams.set*()

Kotlin: Use property syntax property = value
Java: All set*() functions don't return itself (changed to void type)

com.sendbird.android.UserMessageParams

com.sendbird.android.params.UserMessageCreateParams
com.sendbird.android.params.UserMessageUpdateParams

com.sendbird.android.FileMessageParams

com.sendbird.android.params.FileMessageCreateParams
com.sendbird.android.params.FileMessageUpdateParams

com.sendbird.android.GroupChannelParams

com.sendbird.android.params.GroupChannelCreateParams
com.sendbird.android.params.GroupChannelUpdateParams

com.sendbird.android.OpenChannelParams

com.sendbird.android.params.OpenChannelCreateParams
com.sendbird.android.params.OpenChannelUpdateParams

GroupChannelCollection.Builder.build()

SendbirdChat.createGroupChannelCollection(GroupChannelCollectionCreateParams)

MessageCollection.Builder.build()

SendbirdChat.createMessageCollection(MessageCollectionCreateParams)

PublicGroupChannelListQuery.isIncludeEmpty()

PublicGroupChannelListQuery.includeEmpty

PublicGroupChannelListQuery.isIncludeFrozen()

PublicGroupChannelListQuery.includeFrozen

PublicGroupChannelListQuery.isIncludeMetaData()

PublicGroupChannelListQuery.includeMetaData

GroupChannelListQuery.isIncludeEmpty()

GroupChannelListQuery.includeEmpty

GroupChannelListQuery.isIncludeFrozen()

GroupChannelListQuery.includeFrozen

GroupChannelListQuery.isIncludeMetaData()

GroupChannelListQuery.includeMetaData

OpenChannelListQuery.isIncludeFrozen()

OpenChannelListQuery.includeFrozen

OpenChannelListQuery.isIncludeMetaData()

OpenChannelListQuery.includeMetaData

GroupChannelMemberListQuery.create()

GroupChannel.createMemberListQuery()

PreviousMessageListQuery.create()

BaseChannel.createPreviousMessageListQuery()

GroupChannel.invite(User, CompletionHandler?)
GroupChannel.invite(String, CompletionHandler?)
GroupChannel.invite(List<User>, CompletionHandler?)

Removed

GroupChannel.inviteWithUserIds(List<String>, CompletionHandler?)

GroupChannel.invite(List<String>, CompletionHandler?)

GroupChannelListQuery.MemberStateFilter

com.sendbird.android.user.query.MyMemberStateFilter

GroupChannelListQuery.getMemberStateFilter()

GroupChannelListQuery.myMemberStateFilter

GroupChannelListQuery.setMemberStateFilter()

GroupChannelListQuery.myMemberStateFilter

SendBird.getGroupChannelCount(GroupChannelListQuery.MemberStateFilter, GroupChannel.GroupChannelChannelCountHandler)

SendbirdChat.getGroupChannelCount(MyMemberStateFilter, CountHandler)

CollectionEventSource.EVENT_DELIVERY_RECEIPT_UPDATED

CollectionEventSource.EVENT_DELIVERY_STATUS_UPDATED

CollectionEventSource.EVENT_READ_RECEIPT_UPDATED

CollectionEventSource.EVENT_READ_STATUS_UPDATED

UserListQuery

Replaced by concrete types ApplicationUserListQuery, BannedUserListQuery, BlockedUserListQuery, and MutedUserListQuery