# NotificationChannelGroupCompat

# 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)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/core/app/NotificationChannelGroupCompat "View this page in Java")


```
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                                                                                                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[NotificationChannelGroupCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat.Builder) Builder class for [NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat) objects. |

|                                                                                                                                                       ### Public functions                                                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat)`!>` | [getChannels](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#getChannels())`()` Returns the list of channels that belong to this group.                                                                                                                                                 |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?`                                                                                                                                                                                                                                              | [getDescription](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#getDescription())`()` Gets the user visible description of the group.                                                                                                                                                   |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                 | [getId](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#getId())`()` Gets the id of the group.                                                                                                                                                                                           |
| [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?`                                                                                                                                                                                                                                 | [getName](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#getName())`()` Gets the user visible name of the group.                                                                                                                                                                        |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                                                               | [isBlocked](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#isBlocked())`()` Returns whether or not notifications posted to [NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat) belonging to this group are blocked. |
| [NotificationChannelGroupCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat.Builder)                                                                                                                                                                                 | [toBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat#toBuilder())`()` Creates a [Builder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat.Builder) instance with all the writeable property values of this instance.              |

## Public functions

### getChannels

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

```
fun getChannels(): (Mutable)List<NotificationChannelCompat!>
```

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 [NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat).  

### getDescription

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

```
fun getDescription(): String?
```

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)  

```
fun getId(): String
```

Gets the id of the group.  

### getName

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

```
fun getName(): CharSequence?
```

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)  

```
fun isBlocked(): Boolean
```

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

This value is always `false` before [P](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 [NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat).  

### toBuilder

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

```
fun toBuilder(): NotificationChannelGroupCompat.Builder
```

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