SDK v6.26.0 Unread Count Migration Guide
This document outlines the steps for migrating from the previous implementation approach to the latest unread count feature in your project (Android, iOS SDK version 6.26.0 and above, and TS SDK version 6.18.0 and above). By following these guidelines, you can ensure a smooth transition and leverage the improved functionality offered by the new approach.
Removal of Deprecated Methods:
Remove all implementations of AmityCoreClient.startUnreadSync() and AmityCoreClient.stopUnreadSync(): These methods have been deprecated and are no longer supported.
Enabling Unread Count Feature:
Activate the unread count feature after client initialization: Follow the instructions provided in the Social Plus documentation to enable the unread count feature once your client is fully initialized: https://docs.amity.co/amity-sdk/chat/channels/unread-count#enable-unread-count
Method Replacements:
Replace channel.getUnreadCount() with channel.getSubChannelsUnreadCount(): These methods offer improved clarity and consistency.
Replace UserUnread.hasMentioned, channel.hasMentioned, and subChannel.hasMentioned with UserUnread.isMentioned(), channel.isMentioned(), and subChannel.isMentioned(): These methods offer improved clarity and consistency.
Switch startReading() with startMessageReceiptSync(): Utilize startMessageReceiptSync() for synchronizing read and delivered counts as recommended in the documentation: https://docs.amity.co/amity-sdk/chat/channels/unread-count/observe-reading-count#starting-observation
Replace stopReading() with stopMessageReceiptSync(): Employ stopMessageReceiptSync() to stop message read and delivered counts synchronization to release the resource for observing other chats as outlined in the documentation: https://docs.amity.co/amity-sdk/chat/channels/unread-count/observe-reading-count#stopping-observation
Implementing Message Marking as Read:
Integrate message marking as read functionality within your chatroom page: Refer to the Social Plus documentation for guidance on implementing this feature: https://docs.amity.co/amity-sdk/chat/channels/unread-count/mark-message-as-read
Additional Notes:
It's crucial to thoroughly test your implementation after completing the migration process to ensure everything functions as expected.
For any further questions or clarifications, please reach out to our support team. https://docs.amity.co/miscellaneous/support#do-you-have-a-question
By following these steps and considering the additional notes, you can successfully migrate your unread count feature to the latest approach, enhancing your application's functionality and user experience.
Last updated