AmityMessageRepository
createImageMessage(subChannelId: String, imageUri: Uri)
Use createImageMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createVideoMessage(subChannelId: String, videoUri: Uri)
Use createVideoMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createFileMessage(subChannelId: String, fileUri: Uri)
Use createFileMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createAudioMessage(subChannelId: String, audioUri: Uri)
Use createAudioMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
This guide is to provide information about breaking changes and how to migrate to the AmitySDK Android 6.0.0 version.
As announced here, Deprecation announcements, this version replaces PagedList and RxJava2 with PagingData and RxJava3.
Live capability has been upgraded with RxJava3. Include RxJava3 to your project with this guide, RxJava Getting Started, or use SDK’s extension function to Rx2() to bridge the SDK functions back to RxJava2.
The Paginated collection has been upgraded with PagingData. To consume PaginData, replace Android’s PagedListAdapter with PagingDataAdapter following this guide, Paging V3 migration.
Create
Channel creation with custom id is no longer supported
Query
Message query from channel is no longer supported. Messages from each channel are migrated to the corresponding channel’s default sub-channel. Refer to Subchannel feature documentation.
StackFromEnd option is no longer supported. To achieve Chat room behaviour, use sortyBy()
with the value AmityMessageQuerySortOption.LAST_CREATED
and reverse the RecyclerView.
Create
Message creation on the channels is no longer supported. Messages must be created on Subchannels only. Refer to Subchannel feature documentation.
RTE
Automatic subscription to messages on Live and Broadcast channels is no longer supported. To receive real time updates on these channels, explicitly subscribe to the channel. Refer to RTE documentation.
Create
Comment creation with custom id is no longer supported.
All SDK classes are required to be newly imported into your project as API classes are relocated to com.amity.socialcloud.sdk.api and model classes are relocated to com.amity.socialcloud.sdk.model
AmityChannelRepository
createChannel()
createChannel(displayName: String)
Channel creation with custom id is no longer supported.
Channel creation requires displayName
fetchChannel(channelId: String)
Removed
Use getChannel(channelId: String)
instead
observeChannel(channelId: String)
Removed
Use getChannel(channelId: String)
instead
getTotalUnreadCount()
AmityChannel.getDefaultSubChannelUnreadCount()
AmityChannelParticipation
startReading()
Removed
stopReading()
Removed
AmityChannelMembershipQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityChannelMemberSearch
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityMessageRepository
createMessage(channelId: String)
createMessage(subChannelId: String)
getMessages(channelId: String)
getMessages(subChannelId: String)
AmityMessageQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityMessageQuery.Builder
stackFromEnd(stackFromEnd: Boolean)
Removed
Use sortBy(sortOption: AmityMessageQuerySortOption)
instead
AmityMessageReactionQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCoreClient
setup(apiKey: String, httpEndpoint: String, socketEndpoint: String)
Removed
Use
setup(apiKey: String, endpoint: AmityEndpoint)
instead.
For custom endpoint, use AmityEndpoint.CUSTOM()
unregisterDeviceForPushNotification(userId: String)
Removed
Use unregisterDeviceForPushNotification()
instead
AmityFileRepository
uploadAudio(uri : Uri)
Return
Flowable<AmityUploadResult<AmityAudio>>
instead of
AmityAudioUploadService.Builder
uploadFile(uri: Uri)
Return
Flowable<AmityUploadResult<AmityFile>>
instead of
AmityFileUploadService.Builder
uploadImage(uri: Uri)
Return
Flowable<AmityUploadResult<AmityImage>>
instead of
AmityImageUploadService.Builder
uploadVideo(uri: Uri)
Removed
Use uploadVideo(uri: Uri, contentFeedType: AmityContentFeedType)
instead
uploadVideo(uri: Uri, contentFeedType: AmityContentFeedType)
Return
Flowable<AmityUploadResult<AmityVideo>>
instead of
AmityVideoUploadService.Builder
AmityMyFollowersQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityMyFollowingsQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserFollowersQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserFollowingsQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserSearch
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserNotification
setAllowed(isAllowed: Boolean)
Removed
Use enable()
or disable()
instead
isAllowed
Removed
Use getSettings()
instead
AmityUserUpdate
update()
apply()
AmityCommunityCategoryQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCommentRepository
observeComment(commentId: String)
getComment(commentId: String)
createComment(commentId: String)
Removed
Comment creation with custom id is no longer supported
deleteComment(commentId: String)
softDeleteComment(commentId: String)
deleteComment(commentId: String, hardDelete: Boolean)
hardDeleteComment(commentId: String)
AmityCommentReactionQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCommunityQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCommunityModeration
addRole(role: String, userIds: List)
Removed
Use addRoles(role: List<String>), userIds: List<String>)
instead
removeRole(role: String, userIds: List)
Removed
Use removeRoles(role: List<String>), userIds: List<String>)
instead
AmityMembershipQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCommunityMembershipSearch
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityFeedRepository
createPost()
Removed
Use equivalent method in AmityPostRepository instead
getPost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
deletePost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
reviewPost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
getReactions(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
getComments(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
AmityPostRepository
deletePost(postId: String)
softDeletePost(postId: String)
deletePost(postId: String, hardDelete: Boolean)
hardDeletePost(postId: String)
AmityCommunityPostQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityUserPostQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityGlobalFeedQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityCustomRankingGlobalFeedQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityPostReactionQuery
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
AmityStreamRepository
getStream(streamId: String)
Removed
Use observeStream(streamId: String)
instead
AmityStreamQuery
getStream(streamId: String)
Removed
Use observeStream(streamId: String)
instead
AmityChannel
getUnreadCount()
getDefaultSubChannelUnreadCount()
hasUnreadMention()
hasDefaultSubChannelUnreadMention()
AmityMessage
getChannelSegment()
getSegment()
getChildrenNumber()
getChildCount()
getUser()
getCreator()
getUserId()
getCreatorId()
AmityComment
getChildrenNumber()
getChildCount()
getUser()
getCreator()
getUserId()
getCreatorId()
AmityCommunity
getUser()
getCreator()
getUserId()
getCreatorId()
AmityPost
getUser()
getCreator()
getUserId()
getCreatorId()
AmityStream
getUser()
getCreator()
AmityChannelRepository
updateChannel()
Use editChannel() instead
AmityMessageRepository
createMessage()
Use createTextMessage()
or createImageMessage()
or createFileMessage()
or createVideoMessage()
or createAudioMessage()
or createCustomMessage()
instead
AmityMessage
delete()
Use AmityChatClient.newMessageRepostiory().softDeleteMessage() instead
AmityMessage.Data.TEXT
edit()
Use AmityChatClient.newMessageRepostiory().editTextMessage()
instead
AmityMessage.Data.CUSTOM
edit()
Use AmityChatClient.newMessageRepostiory().editCustomMessage()
instead
AmityMessageFlagger()
flag()
Use AmityChatClient.newMessageRepostiory().flagMessage() instead
unflag()
Use AmityChatClient.newMessageRepostiory().unflagMessage() instead
AmitySubChannelRepository
deleteSubChannel()
Use softDeleteSubChannel()
or hardDeleteSubChannel() instead
updateSubChannel()
Use editSubChannel() instead
AmityPostRepository
createPost()
Use createTextPost()
or createImagePost()
or createFilePost()
or createVideoPost()
or createPollPost()
or createLiveStreamPost()
instead
registerDeviceForPushNotifications()
Use registerPushNotification() instead
unregisterDeviceForPushNotifications()
Use unregisterPushNotification() instead
notification()
Use notifications.user() instead
notification()
Use AmityCoreClient.notifications().channel() instead
notification()
Use AmityCoreClient.notifications.community() instead
membership().addMembers()
Use moderation().addMembers() instead
membership().removeMembers()
Use moderation().removeMembers() instead
moderation().banUsers()
Use moderation().banMembers() instead
moderation().unbanUsers()
Use moderation().unbanMembers() instead
getReactions()
Use AmityCoreClient.newReactionRepository.getReactions() instead
react()
Use AmityCoreClient.newReactionRepository().addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead
report()
Use AmitySocialClient.newCommentRepository().flagComment() or AmitySocialClient.newCommentRepository().unflagComment() instead
delete()
Use AmitySocialClient.newCommentRepository().softDeleteComment() or AmitySocialClient.newCommentRepository().hardDeleteComment() instead
edit()
AmitySocialClient.newCommentRepository().updateComment() instead
getReactions()
Use AmityCoreClient.newReactionRepository().getReactions() instead
react()
Use AmityCoreClient.newReactionRepository().addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead
getReactions()
Use AmityCoreClient.newReactionRepository().getReactions() instead
review()
Use AmitySocialClient.newPostRepository().approvePost() or AmitySocialClient.newPostRepository().declinePost() instead
react()
Use AmityCoreClient.newReactionRepository.()addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead
report()
Use AmitySocialClient.newPostRepository().flagPost() or AmitySocialClient.newPostRepository().unflagPost() instead
delete()
Use AmitySocialClient.newPostRepository().softDeletePost() or AmitySocialClient.newPostRepository().hardDeletePost() instead
edit()
AmitySocialClient.newPostRepository().updatePost() instead
getFeedType()
Use getReviewStatus() instead
relationship().me().getFollowInfo()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowInfo() instead
relationship().me().getFollowers()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowers() instead
List of followers query can be filtered by AmityReviewStatus
relationship().me().getFollowings()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowings() instead
relationship().me().accept()
Use AmityCoreClient.newUserRepository().relationship().acceptMyFollower() instead
relationship().me().decline()
Use AmityCoreClient.newUserRepository().relationship().declineMyFollower() instead
relationship().me().unfollow()
Use AmityCoreClient.newUserRepository().relationship().unfollow() instead
relationship().me().removeFollower()
Use AmityCoreClient.newUserRepository().relationship().removeMyFollower() instead
relationship().user().getFollowInfo()
Use AmityCoreClient.newUserRepository().relationship().getFollowInfo() instead
relationship().user().getFollowers()
Use AmityCoreClient.newUserRepository().relationship().getFollowers() instead
relationship().user().getFollowings()
Use AmityCoreClient.newUserRepository().relationship().getFollowings() instead
relationship().user().follow()
Use AmityCoreClient.newUserRepository().relationship().follow() instead
AmityFeedType
Use AmityReviewStatus instead
AmityChannelModeration
muteChannel()
Use AmityChatClient.newChannelRepository().muteChannel() instead
unmuteChannel()
AmityChatClient.newChannelRepository().unmuteChannel() instead
AmityCoreClient
updateUser()
Use editUser()
instead
AmityUserRepository
searchUserByDisplayname()
Use searchUsers() instead
AmityCommentRepository
updateComment()
Use editComment() instead
AmityCommentRepository
updateCommunity()
Use editCommunity() instead
AmityCommunityModeration()
addMembers()
Use AmitySocialClient.newCommunityRepository().membership().addMembers() instead
removeMembers()
Use AmitySocialClient.newCommunityRepository().membership().removeMembers() instead
AmityPollRepository
voll()
Use AmitySocialClient.newPollRepository().votePoll() instead
AmityPostRepository
updatePost()
Use editPost() instead
updateCustomPost()
Use editCustomPost() instead
AmityStreamRepository
observeStream()
Use getStream() instead
createVideoStream()
Use createStream() instead