Android SDK v7.0.0 Migration Guide

This guide is to provide information about breaking changes and how to migrate from 6.x.x version to v7.0.0. AmitySDK 7.0.0 is the major release of our SDK.

Interface changes

API

AmityChannelRepository

Methods
Changes
Remarks

updateChannel(channelId: String)

removed

Use editChannel(...) instead. Available since v6.

notification(channelId: String)

removed

Use AmityCoreClient.notifications.channel(channelId: String) instead. Available since v6.

AmityChannelModeration

Methods
Changes
Remarks

muteChannel()

removed

Use AmityChatClient.newChannelRepository().muteChannel(...) instead. Available since v6.

unmuteChannel()

removed

Use AmityChatClient.newChannelRepository().unmuteChannel(...) instead. Available since v6.

AmityMessageRepository

Methods
Changes
Remarks

createMessage(subChannelId: String)

removed

Use the dedicated message creation functions with the corresponding message type instead. Available since v6.

deleteMessage(messageId: String)

removed

Use softDeleteMessage(...) instead. Available since v6.

getReactions(commentId: String)

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6.

AmitySubChannelRepository

Methods
Changes
Remarks

updateSubChannel(subChannelId: String)

removed

Use editSubChannel(...) instead. Available since v6.

deleteSubChannel(...)

removed

Use softDeleteSubChannel(...) or hardDeleteSubChannel(...) instead. Available since v6.

startReading(subChannelId: String)

removed

Use startMessageReceiptSync(...) instead. Available since v6.

stopReading(subChannelId: String)

removed

Use stopMessageReceiptSync(...) instead. Available since v6.

AmityCoreClient

Methods
Changes
Remarks

registerDeviceForPushNotification()

removed

Use registerPushNotification() instead. Available since v6.

unregisterDeviceForPushNotification()

removed

Use unregisterDeviceForPushNotification() instead. Available since v6.

updateUser()

removed

Use editUser() instead. Available since v6.

notification()

removed

Use notifications() instead. Available since v6.

startUnreadCountSyncing()

removed

Use automatic syncing by calling enableUnreadCount() once per app life cycle. Available since v6.

startUnreadSync()

removed

Use automatic syncing by calling enableUnreadCount() once per app life cycle. Available since v6.

stopUnreadCountSyncing()

removed

Use automatic syncing by calling enableUnreadCount() once per app life cycle. Available since v6.

stopUnreadSync()

removed

Use automatic syncing by calling enableUnreadCount() once per app life cycle. Available since v6.

getTotalUnreadCount()

removed

Use observeUserUnread() instead. Available since v6.

AmityReactionRepository

Methods
Changes
Remarks

getReactions(...)

Deprecated AmityReactionReference param

Use AmityReactionReferenceType and referenceId instead.

addReaction(...)

Deprecated AmityReactionReference param

Use AmityReactionReferenceType and referenceId instead.

removeReaction(...)

Deprecated AmityReactionReference param

Use AmityReactionReferenceType and referenceId instead.

AmityUserRepository

Methods
Changes
Remarks

searchUserByDisplayName()

removed

Use searchUsers(...) instead. Available since v6.

getCurrentUser()

removed

Use AmityCoreClient.getCurrentUser(...) instead. Available since v6.

report(userId: String)

removed

Use flagUser(...) or unflagUser(...) instead. Available since v6.

getViewedUsers(postId: String)

removed

Use getReachedUsers(...) instead. Available since v6.

AmityCommentRepository

Methods
Changes
Remarks

updateComment(commentId: String)

removed

Use editComment(...) instead. Available since v6

getReactions(commentId: String)

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6

AmityCommunityRepository

Methods
Changes
Remarks

updateCommunity(communityId: String)

removed

Use editCommunity(...) instead. Available since v6

notification(communityId: String)

removed

Use AmityCoreClient.notifications.community(communityId: String) instead. Available since v6

AmityCommunityModeration

Methods
Changes
Remarks

addMembers(userIds: List<String>)

removed

Use AmityCommunityParticipation.addMembers(...) instead. Available since v6

removeMembers(userIds: List<String>)

removed

Use AmityCommunityParticipation.removeMembers(...) instead. Available since v6

AmityPollRepository

Methods
Changes
Remarks

vote(...)

removed

Use votePoll(...) instead. Available since v6

AmityPostRepository

Methods
Changes
Remarks

createTextPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createImagePost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createVideoPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createFiletPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createPollPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createLiveStreamPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

createCustomPost(...)

Deprecated AmityPost.Target param

Use AmityPost.TargetType and targetId instead.

updatePost()

removed

Use editPost(...) instead. Available since v6.

updateCustomPost(...)

removed

Use editCustomPost(...) instead. Available since v6

reviewPost(postId: String)

removed

Use approvePost(...) or declinePost(...) instead. Available since v6.

getReactions(postId: String)

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6.

getComments(postId: String)

removed

Use AmityCommentRepository.getComments(...) instead. Available since v6.

AmityStreamRepository

Methods
Changes
Remarks

observeStream(streamId: String)

removed

Use getStream(streamId: String) instead. Available since v6.

createVideoStream(...)

removed

Use createStream(streamId: String) instead. Available since v6.

Model

AmityEndpoint

Sealed class
Changes
Remarks

CUSTOM(... )

Removed socketEndpoint: String from the constructor

Socket endpoint is no longer in use by SDK

AmityChannel

Methods
Changes
Remarks

getUnreadCount()

removed

Use getSubChannelsUnreadCount() instead. Available since v6.

getDefaultSubChannelUnreadCount()

removed

Use getSubChannelsUnreadCount() instead. Available since v6.

hasMentioned()

removed

Use isMentioned(...) instead. Available since v6.

hasDefaultSubChannelUnreadMention()

removed

Use isMentioned(...) instead. Available since v6.

AmityMessage

Methods
Changes
Remarks

delete()

removed

Use AmityMessageRepository.softDeleteMessage() instead. Available since v6.

react()

removed

Use AmityReactionRepository.addReaction(...) or removeReaction(...) instead. Available since v6.

getReactions()

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6.

report()

removed

Use AmityMessageRepository.flagMessage() or unflagMessage() instead. Available since v6.

AmitySubChannel

Methods
Changes
Remarks

hasMentioned()

removed

Use isMentioned() instead. Available since v6.

startReading()

removed

Use AmitySubChannelRepository.startMessageReceiptSync() instead. Available since v6.

stopReading()

removed

Use AmitySubChannelRepository.stopMessageReceiptSync() instead. Available since v6.

AmityFileInfo

Methods
Changes
Remarks

getFileSize()

Replace Int with Long as return type

getProgressPercentage()

removed

Use AmityFileRepository.getUploadInfo(...) instead. Available since v6.

AmityImage.SIZE

Enums
Changes
Remarks

FULL

removed

Use LARGE instead. Available since v6.

AmityUser

Methods
Changes
Remarks

report()

removed

Use AmityUserRepostiory.flagUser(...) or unflagUser(...) instead. Available since v6.

AmityComment

Methods
Changes
Remarks

getDataType()

removed

Use getDataTypes(...) instead. Available since v6.

edit()

removed

Use AmityCommentRepository.editComment() instead. Available since v6.

delete()

removed

Use AmityCommentRepository.softDeleteComment() or hardDeleteComment() instead. Available since v6.

react()

removed

Use AmityReactionRepository.addReaction(...) or removeReaction(...) instead. Available since v6.

getReactions()

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6.

report()

removed

Use AmityCommentRepository.flagComment() or unflagComment() instead. Available since v6.

AmityPost

Methods
Changes
Remarks

comment()

removed

Use AmityCommentRepository.getComments() instead. Available since v6.

delete()

removed

Use AmityPostRepository.softDeletePost() or hardDeletePost() instead. Available since v6.

react()

removed

Use AmityReactionRepository.addReaction(...) or removeReaction(...) instead. Available since v6.

getReactions()

removed

Use AmityReactionRepository.getReactions(...) instead. Available since v6.

report()

removed

Use AmityPostRepository.flagComment() or unflagComment() instead. Available since v6.

AmityPost.DATA.VIDEO

Methods
Changes
Remarks

getVideo(...)

Removed optional AmityVideo.Quality param

Use AmityVideo.getVideoUrl(resolution: AmityVideoResolution?) instead. Available since v6.

Last updated

Was this helpful?