Skip to content

Badges

This article covers how to request the unread News Feeds card count and use that information to power badges for your web application.

Requesting unread News Feed card counts

You can request the number of unread cards at any time by calling:

1
braze.getCachedFeed().getUnreadCardCount();

This is often used to power badges signifying how many unread News Feed cards there are. See the JSDocs for more information. Note that Braze will not refresh News Feed cards on new page loads (and so this function will return 0) until you show the feed or call braze.requestFeedRefresh();

HOW HELPFUL WAS THIS PAGE?
New Stuff!