Observe unread count
Returns the count of unread messages.
You can get the count of unread messages for the current user.
This API returns a LiveData
of type Int
and will notify your app if the count changes. See the Android developer docs to learn more about LiveData.
Sample use case
- Show a badge in your app with the number of unread messages for your user.
val unreadCount = liveData {
emitSource(Kustomer.getInstance().observeUnreadCount())
}
Updated almost 2 years ago