Mark023 Mark023 - 2 months ago 11
Android Question

Android display multiple messages in a single notification

Currently, I receive notifications from a server. What happens is, if I get a notification, I dont see it for long time. When a new notification comes, I lose the previous one. I want a single notification with multiple messages something like this -

enter image description here


It is InboxStyle notification

Notification notif = new Notification.Builder(mContext)
 .setContentTitle("5 New mails from " + sender.toString())
 .setStyle(new Notification.InboxStyle()
     .setSummaryText("+3 more"))

Here is official document

check this example also - Inbox Style Notification Like Whatsapp