如何在android中正确堆叠通知?

如何在android中正确堆叠通知?,android,push-notification,notifications,Android,Push Notification,Notifications,这是我当前的android代码: notification = new NotificationCompat.Builder(this); notification.setContentTitle(notifyFromName); notification.setContentText(notifyMsg); if (!msgIsProj) { String followText = notifyMsg + " you!"; notification.setContentTex

这是我当前的android代码:

notification = new NotificationCompat.Builder(this);
notification.setContentTitle(notifyFromName);
notification.setContentText(notifyMsg);

if (!msgIsProj) {
    String followText = notifyMsg + " you!";
    notification.setContentText(followText);
    notification.setGroup(GROUP_KEY_FOLLOWERS);
} else {

    notification.setContentText(notifyMsg + " " + notifyItemName);
    notification.setGroup(GROUP_KEY_PROJECTS);
}
notification.setTicker(getString(R.string.titlePushNotify));
notification.setSmallIcon(R.drawable.ic_pushnotify);
notification.setGroupSummary(true);
PendingIntent contentIntent = PendingIntent.getActivity(this, 1000,
                              newIntentMsg, PendingIntent.FLAG_CANCEL_CURRENT);
notification.setContentIntent(contentIntent);
notification.setAutoCancel(true);
manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

if (notifyMsg != null && !notifyMsg.equals("")) {

    manager.notify(0, notification.build());
}
正如您所看到的,我添加了
setGroup
setGroupSummary
——但是,我在android文档中看到,我还必须添加一个摘要通知。有点困惑我是如何做到这一点的,如果是这样的话,我该如何调用addLine-它从哪里获取信息

如果有人知道我如何实现它,或者举个例子就好了