Android 当推送通知的计数超过一个时,向组添加推送通知

Android 当推送通知的计数超过一个时,向组添加推送通知,android,push-notification,firebase-notifications,Android,Push Notification,Firebase Notifications,目前,我已经为我的android应用程序创建了组密钥,以便推送通知可以分组在一起。我的最低目标api级别是24,因此我不需要创建任何摘要通知。我所做的是这样的: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, channelID) .setSmallIcon(R.drawable.applogo)

目前,我已经为我的android应用程序创建了组密钥,以便推送通知可以分组在一起。我的最低目标api级别是24,因此我不需要创建任何摘要通知。我所做的是这样的:

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, channelID)
                                             .setSmallIcon(R.drawable.applogo)
                                             .setContentTitle(sourceName)
                                             .setContentText(messageTitle)
                                             .setPriority(NotificationCompat.PRIORITY_HIGH)
                                             .setSound(defaultSoundUri)
                                             .setAutoCancel(true)
                                             .setContentIntent(contentIntent) 
                                             .setGroup(GROUPID)

因此,我正在创建NotificationCompat生成器。我面临的问题是通知在第四个通知之后被分组在一起。前三个通知将分别显示在通知托盘中。当第四个来的时候,它们被组合在一起。我想知道的是,这是默认行为吗?如果是,那么我如何更改它,就像第二个出现时通知将分组在一起一样?

通知将分组在4之后,这是自24以来的默认行为。要触发小于4的组通知,您需要创建组摘要通知