Mark023 Mark023 - 1 year ago 89
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

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download