public static String getGroup(Notification notification) {
        if (Build.VERSION.SDK_INT >= 20) {
            return notification.getGroup();
        } else if (Build.VERSION.SDK_INT >= 19) {
            return notification.extras.getString(NotificationCompatExtras.EXTRA_GROUP_KEY);
        } else if (Build.VERSION.SDK_INT >= 16) {
            return NotificationCompatJellybean.getExtras(notification).getString(
                    NotificationCompatExtras.EXTRA_GROUP_KEY);
        } else {
            return null;
        }
    }
Get the key used to group this notification into a cluster or stack
with other notifications on devices which support such rendering.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/NotificationCompat.java