I have a some troubles with understanding of goal of setGroup() method.
As docs said :
...Grouped notifications may display in a cluster or stack on d
setGroupSummary
is there to support grouped notifications on devices before Nougat. It replaces the single notifications with 1 summary notification.
On Nougat+ the system creates a normal group, which is not your notification with setGroupSummary(true)
from the official docs:
http://developer.android.com/preview/features/notification-updates.html
Android N also allows you to bundle similar notifications to appear as a single notification. To make this possible, Android N uses the existing NotificationCompat.Builder.setGroup() method. Users can expand each of the notifications, and perform actions such as reply and dismiss on each of the notifications, individually from the notification shade.
Meaning the setGroup
will only make a difference if the device supports it.
Devices that support it are:
The following blog post shows how those work on Android N: https://medium.com/exploring-android/android-n-introducing-upgraded-notifications-d4dd98a7ca92
bellow is a render of that a group looks like:
That means that setGroup
will make no difference on devices running anything bellow API23, that includes, Marshamallow, Lollipop, KitKat, etc.