private boolean applyMessagingStyle(NotificationCompat.Builder builder) {
        MessagingStyle.Message[] messages = options.getAndroidMessages();
        if (messages == null) return false;

        // Find if there is a notification already displayed with this ID.
        StatusBarNotification activeNotification = new Manager(context).getActiveNotification(options.getId());

        MessagingStyle style = activeNotification != null ?
            // If the notification was already displayed, extract the MessagingStyle to add the message
            MessagingStyle.extractMessagingStyleFromNotification(activeNotification.getNotification()) :
            // No active notification, create a new style
            new NotificationCompat.MessagingStyle("");

        // Add the new messages to the style
        for (MessagingStyle.Message message : messages) {
            style.addMessage(message);
        }

        String title = options.getTitle();

        // Add the count of messages to the title if there is more than 1.
        Integer messagesCount = style.getMessages().size();

        if (messagesCount > 1 && options.getTitleCount() != null && !options.getTitleCount().trim().isEmpty()) {
            title += " " + options.getTitleCount().replace("%n%", "" + messagesCount);
        }

        style.setConversationTitle(title);

        // Use the style.
        builder.setStyle(style);

        return true; // style applied
    }
Apply messaging style
@param builder Notification builder instance
@return true if the messaging style was applied
src/android/Notification.java