'is there limit for android group notification?
I have a question for group notifications. I want to use group notification to package the notifications. Before I notify the single notification , i will notify a groupNotifcation. But i found that the packed notification numbers is limited to 8, the newst comes, the oldest cancel. I don't know its my mistake or system restriction.
This is my code. groupNotificationChannelId is a constant.
NotificationCompat.Builder builder = new NotificationCompat.Builder(service, channelId);
initBuilder(builder);
builder.setGroup("A");
builder.setDefaults(Notification.DEFAULT_ALL);
Notification notification = builder.buide();
if (notificationCount >0 ) {
summaryBuilder.setLargeIcon()
.setSmallIcon()
.setColor()
.setContentTitle()
.setContentText()
.setStyle()
.setGroup("A")
.setGroupSummary(true)
.setAutoCancel(true);
summaryBuilder.setDeleteIntent();
summaryBuilder.setContentIntent();
notificationManager.notify(groupNotificationChannelId, summaryBuilder.build());
}
notificationManager.notify((int) (System.currentTimeMillis() / 1000), notification);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
