# NotificationChannelGroupCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationChannelGroupCompat.java+class:androidx.core.app.NotificationChannelGroupCompat) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

*** ** * ** ***


```
public class NotificationChannelGroupCompat
```

<br />

*** ** * ** ***

A grouping of related notification channels. e.g., channels that all belong to a single account. Setters return `this` to allow chaining. This class doesn't do anything on older SDKs which don't support Notification Channels.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat.Builder` Builder class for `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat` objects. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/core/app/NotificationChannelCompat>` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#getChannels()()` Returns the list of channels that belong to this group. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#getDescription()()` Gets the user visible description of the group. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#getId()()` Gets the id of the group. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#getName()()` Gets the user visible name of the group. |
| `boolean` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#isBlocked()()` Returns whether or not notifications posted to `https://developer.android.com/reference/androidx/core/app/NotificationChannelCompat` belonging to this group are blocked. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat.Builder` | `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat#toBuilder()()` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat.Builder` instance with all the writeable property values of this instance. |

## Public methods

### getChannels

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public @NonNull List<NotificationChannelCompat> getChannels()
```

Returns the list of channels that belong to this group.

This is a read-only property which is only valid on instances fetched from the `https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat`.

### getDescription

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public @Nullable String getDescription()
```

Gets the user visible description of the group.

### getId

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public @NonNull String getId()
```

Gets the id of the group.

### getName

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public @Nullable CharSequence getName()
```

Gets the user visible name of the group.

### isBlocked

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public boolean isBlocked()
```

Returns whether or not notifications posted to `https://developer.android.com/reference/androidx/core/app/NotificationChannelCompat` belonging to this group are blocked. This value is independent of `https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat#areNotificationsEnabled()` and `https://developer.android.com/reference/androidx/core/app/NotificationChannelCompat#getImportance()`.

This value is always `false` before `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#P`

This is a read-only property which is only valid on instances fetched from the `https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat`.

### toBuilder

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public @NonNull NotificationChannelGroupCompat.Builder toBuilder()
```

Creates a `https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat.Builder` instance with all the writeable property values of this instance.