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
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
muteChannel()
removed
Use AmityChatClient.newChannelRepository().muteChannel(...) instead. Available since v6.
unmuteChannel()
removed
Use AmityChatClient.newChannelRepository().unmuteChannel(...) instead. Available since v6.
AmityMessageRepository
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
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
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
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
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
updateComment(commentId: String)
removed
Use editComment(...) instead. Available since v6
getReactions(commentId: String)
removed
Use AmityReactionRepository.getReactions(...) instead. Available since v6
AmityCommunityRepository
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
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
vote(...)
removed
Use votePoll(...) instead. Available since v6
AmityPostRepository
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
observeStream(streamId: String)
removed
Use getStream(streamId: String) instead. Available since v6.
createVideoStream(...)
removed
Use createStream(streamId: String) instead. Available since v6.
Model
AmityEndpoint
CUSTOM(... )
Removed socketEndpoint: String from the constructor
Socket endpoint is no longer in use by SDK
AmityChannel
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
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
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
getFileSize()
Replace Int with Long as return type
getProgressPercentage()
removed
Use AmityFileRepository.getUploadInfo(...) instead. Available since v6.
AmityImage.SIZE
FULL
removed
Use LARGE instead. Available since v6.
AmityUser
report()
removed
Use AmityUserRepostiory.flagUser(...) or unflagUser(...) instead. Available since v6.
AmityComment
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
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
getVideo(...)
Removed optional AmityVideo.Quality param
Use AmityVideo.getVideoUrl(resolution: AmityVideoResolution?) instead. Available since v6.
Last updated
Was this helpful?