// Let's get the total count
Long total = notificationAPI.getNotificationsCount();
// Let's mark the new notifications as read
notificationAPI.markNotificationsAsRead(user.getUserId());
List<Notification> notifications = allUsers?notificationAPI.getNotifications(offset, limit):notificationAPI.getNotifications(user.getUserId(), offset, limit);
for (Notification n : notifications) {
JSONObject notificationJSON = new JSONObject();