Hello 👋 How can we help?

Display unread messages' count in your Android app

Use the following method to display the number of unread chat messages in your Android app.
Written by Konstantine
Updated 1 week ago

You can get a quantity of current chat’s unread messages (for example for displaying on the app icon) by calling this method:

HelpCrunch.getUnreadMessagesCount(new Callback() {
  @Override
  public void onSuccess(MessagesCountResponse result) {
    int unreadMessagesCount = result.getMessagesCount();
  }
  @Override
  public void onError(Exception e) {
  }
});
Did this answer your question?