# NotificationManagerCompat

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

*** ** * ** ***

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


```
class NotificationManagerCompat
```

<br />

*** ** * ** ***

Compatibility library for NotificationManager with fallbacks for older platforms.

To use this class, call the static function [from](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#from(android.content.Context)) to get a [NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat) object, and then call one of its methods to post or cancel notifications.

## Summary

| ### Nested types |
|---|
| `class `[NotificationManagerCompat.NotificationWithIdAndTag](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat.NotificationWithIdAndTag) Helper class which encapsulates a Notification, its id, and optionally a tag, for use when batch-posting a number of notifications. |

| ### Constants |
|---|---|
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [ACTION_BIND_SIDE_CHANNEL](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#ACTION_BIND_SIDE_CHANNEL())` = "android.support.BIND_NOTIFICATION_SIDE_CHANNEL"` Intent action to register for on a service to receive side channel notifications. |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [EXTRA_USE_SIDE_CHANNEL](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#EXTRA_USE_SIDE_CHANNEL())` = "android.support.useSideChannel"` Notification extras key: if set to true, the posted notification should use the side channel for delivery instead of using notification manager. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_DEFAULT](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_DEFAULT())` = 3` Default notification importance: shows everywhere, allowed to makes noise, but does not visually intrude. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_HIGH](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_HIGH())` = 4` Higher notification importance: shows everywhere, allowed to makes noise and peek. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_LOW](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_LOW())` = 2` Low notification importance: shows everywhere, but is not intrusive. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_MAX](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_MAX())` = 5` Highest notification importance: shows everywhere, allowed to makes noise, peek, and use full screen intents. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_MIN](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_MIN())` = 1` Min notification importance: only shows in the shade, below the fold. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_NONE](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_NONE())` = 0` A notification with no importance: shows nowhere, is blocked. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IMPORTANCE_UNSPECIFIED](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_UNSPECIFIED())` = -1000` Value signifying that the user has not expressed an importance. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INTERRUPTION_FILTER_ALARMS](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#INTERRUPTION_FILTER_ALARMS())` = 4` [Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Alarms only interruption filter - all notifications except those of category [CATEGORY_ALARM](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_ALARM()) are suppressed. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INTERRUPTION_FILTER_ALL](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#INTERRUPTION_FILTER_ALL())` = 1` [Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Normal interruption filter - no notifications are suppressed. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INTERRUPTION_FILTER_NONE](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#INTERRUPTION_FILTER_NONE())` = 3` [Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - No interruptions filter - all notifications are suppressed and all audio streams (except those used for phone calls) and vibrations are muted. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INTERRUPTION_FILTER_PRIORITY](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#INTERRUPTION_FILTER_PRIORITY())` = 2` [Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Priority interruption filter - all notifications are suppressed except those that match the priority criteria. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INTERRUPTION_FILTER_UNKNOWN](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#INTERRUPTION_FILTER_UNKNOWN())` = 0` [Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - returned when the value is unavailable for any reason. |

| ### Public functions |
|---|---|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [areNotificationsEnabled](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#areNotificationsEnabled())`()` Returns whether notifications from the calling package are not blocked. |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [canPostPromotedNotifications](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#canPostPromotedNotifications())`()` Returns whether the calling app's properly formatted notifications can appear in a promoted format, which may result in higher ranking, appearances on additional surfaces, and richer presentation. |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [canUseFullScreenIntent](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#canUseFullScreenIntent())`()` Returns whether the calling app can send fullscreen intents. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [cancel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#cancel(int))`(id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Cancel a previously shown notification. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [cancel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#cancel(java.lang.String,int))`(tag: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?, id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Cancel a previously shown notification. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [cancelAll](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#cancelAll())`()` Cancel all previously shown notifications. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannel(android.app.NotificationChannel))`(channel: `[NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`)` Creates a notification channel that notifications can be posted to. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannel(androidx.core.app.NotificationChannelCompat))`(channel: `[NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat)`)` Creates a notification channel that notifications can be posted to. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroup(android.app.NotificationChannelGroup))`(group: `[NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html)`)` Creates a group container for [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html) objects. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat))`(group: `[NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat)`)` Creates a group container for [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html) objects. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannelGroups](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroups(java.util.List<android.app.NotificationChannelGroup>))`(` ` groups: (`[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)`<`[NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html)`!>` `)` Creates multiple notification channel groups. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannelGroupsCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroupsCompat(java.util.List<androidx.core.app.NotificationChannelGroupCompat>))`(` ` groups: (`[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)`<`[NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat)`!>` `)` Creates multiple notification channel groups. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannels](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannels(java.util.List<android.app.NotificationChannel>))`(` ` channels: (`[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)`<`[NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`!>` `)` Creates multiple notification channels that different notifications can be posted to. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [createNotificationChannelsCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelsCompat(java.util.List<androidx.core.app.NotificationChannelCompat>))`(` ` channels: (`[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)`!>` `)` Creates multiple notification channels that different notifications can be posted to. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [deleteNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#deleteNotificationChannel(java.lang.String))`(channelId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Deletes the given notification channel. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [deleteNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#deleteNotificationChannelGroup(java.lang.String))`(groupId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Deletes the given notification channel group, and all notification channels that belong to it. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [deleteUnlistedNotificationChannels](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String>))`(` ` channelIds: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/index.html)`)`[Collection](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` `)` Deletes notification channels for which ids are NOT given. |
| `java-static `[NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat) | [from](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#from(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Get a [NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat) instance for a provided context. |
| `(`[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)`<`[StatusBarNotification](https://developer.android.com/reference/android/service/notification/StatusBarNotification.html)`!>` | [getActiveNotifications](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getActiveNotifications())`()` Recover a list of active notifications: ones that have been posted by the calling app that have not yet been dismissed by the user or [cancel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#cancel(java.lang.String,int))ed by the app. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getCurrentInterruptionFilter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter())`()` Gets the current notification interruption filter. |
| `java-static (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | [getEnabledListenerPackages](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getEnabledListenerPackages(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Get the set of packages that have an enabled notification listener component within them. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getImportance](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getImportance())`()` Returns the user specified importance for notifications from the calling package. |
| [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`?` | [getNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannel(java.lang.String))`(channelId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel settings for a given channel id. |
| [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`?` | [getNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannel(java.lang.String,java.lang.String))`(channelId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`, conversationId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel settings for a given channel and [conversation id](https://developer.android.com/reference/android/content/pm/ShortcutInfo.html#getId()). |
| [NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat)`?` | [getNotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelCompat(java.lang.String))`(channelId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel settings for a given channel id. |
| [NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat)`?` | [getNotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelCompat(java.lang.String,java.lang.String))`(channelId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`, conversationId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel settings for a given channel and [conversation id](https://developer.android.com/reference/android/content/pm/ShortcutInfo.html#getId()). |
| [NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html)`?` | [getNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelGroup(java.lang.String))`(channelGroupId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel group settings for a given channel group id. |
| [NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat)`?` | [getNotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelGroupCompat(java.lang.String))`(channelGroupId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns the notification channel group settings for a given channel group id. |
| `(`[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)`<`[NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html)`!>` | [getNotificationChannelGroups](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelGroups())`()` Returns all notification channel groups belonging to the calling app or an empty list on older SDKs which don't support Notification Channels. |
| `(`[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)`<`[NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat)`!>` | [getNotificationChannelGroupsCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelGroupsCompat())`()` Returns all notification channel groups belonging to the calling app or an empty list on older SDKs which don't support Notification Channels. |
| `(`[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)`<`[NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`!>` | [getNotificationChannels](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannels())`()` Returns all notification channels belonging to the calling app or an empty list on older SDKs which don't support Notification Channels. |
| `(`[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)`!>` | [getNotificationChannelsCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelsCompat())`()` Returns all notification channels belonging to the calling app or an empty list on older SDKs which don't support Notification Channels. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[RequiresPermission](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission)`(value = `[Manifest.permission.POST_NOTIFICATIONS](https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS)`)` [notify](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#notify(java.util.List<androidx.core.app.NotificationManagerCompat.NotificationWithIdAndTag>))`(` ` notificationWithIdAndTags: (`[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)`<`[NotificationManagerCompat.NotificationWithIdAndTag](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat.NotificationWithIdAndTag)`!>` `)` Post a number of notifications, to be shown in the status bar, stream, etc. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[RequiresPermission](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission)`(value = `[Manifest.permission.POST_NOTIFICATIONS](https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS)`)` [notify](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#notify(int,android.app.Notification))`(id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, notification: `[Notification](https://developer.android.com/reference/android/app/Notification.html)`)` Post a notification to be shown in the status bar, stream, etc. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[RequiresPermission](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission)`(value = `[Manifest.permission.POST_NOTIFICATIONS](https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS)`)` [notify](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#notify(java.lang.String,int,android.app.Notification))`(tag: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?, id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, notification: `[Notification](https://developer.android.com/reference/android/app/Notification.html)`)` Post a notification to be shown in the status bar, stream, etc. |

## Constants

### ACTION_BIND_SIDE_CHANNEL

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

```
const val ACTION_BIND_SIDE_CHANNEL = "android.support.BIND_NOTIFICATION_SIDE_CHANNEL": String!
```

Intent action to register for on a service to receive side channel notifications. The listening service must be in the same package as an enabled [NotificationListenerService](https://developer.android.com/reference/android/service/notification/NotificationListenerService.html).  

### EXTRA_USE_SIDE_CHANNEL

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

```
const val EXTRA_USE_SIDE_CHANNEL = "android.support.useSideChannel": String!
```

Notification extras key: if set to true, the posted notification should use the side channel for delivery instead of using notification manager.  

### IMPORTANCE_DEFAULT

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

```
const val IMPORTANCE_DEFAULT = 3: Int
```

Default notification importance: shows everywhere, allowed to makes noise, but does not visually intrude.  

### IMPORTANCE_HIGH

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

```
const val IMPORTANCE_HIGH = 4: Int
```

Higher notification importance: shows everywhere, allowed to makes noise and peek.  

### IMPORTANCE_LOW

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

```
const val IMPORTANCE_LOW = 2: Int
```

Low notification importance: shows everywhere, but is not intrusive.  

### IMPORTANCE_MAX

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

```
const val IMPORTANCE_MAX = 5: Int
```

Highest notification importance: shows everywhere, allowed to makes noise, peek, and use full screen intents.  

### IMPORTANCE_MIN

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

```
const val IMPORTANCE_MIN = 1: Int
```

Min notification importance: only shows in the shade, below the fold.  

### IMPORTANCE_NONE

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

```
const val IMPORTANCE_NONE = 0: Int
```

A notification with no importance: shows nowhere, is blocked.  

### IMPORTANCE_UNSPECIFIED

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

```
const val IMPORTANCE_UNSPECIFIED = -1000: Int
```

Value signifying that the user has not expressed an importance. This value is for persisting preferences, and should never be associated with an actual notification.  

### INTERRUPTION_FILTER_ALARMS

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

```
const val INTERRUPTION_FILTER_ALARMS = 4: Int
```

[Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Alarms only interruption filter - all notifications except those of category [CATEGORY_ALARM](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_ALARM()) are suppressed. Some audio streams are muted.  

### INTERRUPTION_FILTER_ALL

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

```
const val INTERRUPTION_FILTER_ALL = 1: Int
```

[Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Normal interruption filter - no notifications are suppressed.  

### INTERRUPTION_FILTER_NONE

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

```
const val INTERRUPTION_FILTER_NONE = 3: Int
```

[Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - No interruptions filter - all notifications are suppressed and all audio streams (except those used for phone calls) and vibrations are muted.  

### INTERRUPTION_FILTER_PRIORITY

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

```
const val INTERRUPTION_FILTER_PRIORITY = 2: Int
```

[Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - Priority interruption filter - all notifications are suppressed except those that match the priority criteria. Some audio streams are muted. See priorityCallSenders, priorityCategories, priorityMessageSenders to define or query this criteria. Users can additionally specify packages that can bypass this interruption filter.  

### INTERRUPTION_FILTER_UNKNOWN

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

```
const val INTERRUPTION_FILTER_UNKNOWN = 0: Int
```

[Interruption filter](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getCurrentInterruptionFilter()) constant - returned when the value is unavailable for any reason.  

## Public functions

### areNotificationsEnabled

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

```
fun areNotificationsEnabled(): Boolean
```

Returns whether notifications from the calling package are not blocked.  

### canPostPromotedNotifications

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

```
fun canPostPromotedNotifications(): Boolean
```

Returns whether the calling app's properly formatted notifications can appear in a promoted format, which may result in higher ranking, appearances on additional surfaces, and richer presentation. Apps can request this permission by sending the user to the activity that matches the system intent action [ACTION_APP_NOTIFICATION_PROMOTION_SETTINGS](https://developer.android.com/reference/android/provider/Settings.html#ACTION_APP_NOTIFICATION_PROMOTION_SETTINGS()).  

### canUseFullScreenIntent

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

```
fun canUseFullScreenIntent(): Boolean
```

Returns whether the calling app can send fullscreen intents.

Fullscreen intents were introduced in Android [HONEYCOMB](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#HONEYCOMB()), where apps could always attach a full screen intent to their notification via [setFullScreenIntent](https://developer.android.com/reference/android/app/Notification.Builder.html#setFullScreenIntent(android.app.PendingIntent, boolean))}.

Android [Q](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#Q()) introduced the [USE_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/Manifest.permission.html#USE_FULL_SCREEN_INTENT()) permission, where SystemUI will only show the full screen intent attached to a notification if the permission is declared in the manifest.

Starting from Android [UPSIDE_DOWN_CAKE](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#UPSIDE_DOWN_CAKE()), apps may not have permission to use [USE_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/Manifest.permission.html#USE_FULL_SCREEN_INTENT()). If the FSI permission is denied, SystemUI will show the notification as an expanded heads up notification on lockscreen.

To request access, add the [USE_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/Manifest.permission.html#USE_FULL_SCREEN_INTENT()) permission to your manifest, and use [ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT()) to send the user to the settings page where they can grant your app the FSI permission.  

### cancel

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

```
fun cancel(id: Int): Unit
```

Cancel a previously shown notification.  

| Parameters |
|---|---|
| `id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the ID of the notification |

### cancel

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

```
fun cancel(tag: String?, id: Int): Unit
```

Cancel a previously shown notification.  

| Parameters |
|---|---|
| `tag: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | the string identifier of the notification. |
| `id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the ID of the notification |

### cancelAll

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

```
fun cancelAll(): Unit
```

Cancel all previously shown notifications.  

### createNotificationChannel

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

```
fun createNotificationChannel(channel: NotificationChannel): Unit
```

Creates a notification channel that notifications can be posted to. This can also be used to restore a deleted channel and to update an existing channel's name, description, group, and/or importance.

The importance of an existing channel will only be changed if the new importance is lower than the current value and the user has not altered any settings on this channel.

The group of an existing channel will only be changed if the channel does not already belong to a group. All other fields are ignored for channels that already exist. It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `channel: `[NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html) | the channel to create. Note that the created channel may differ from this value. If the provided channel is malformed, a RemoteException will be thrown. |

### createNotificationChannel

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

```
fun createNotificationChannel(channel: NotificationChannelCompat): Unit
```

Creates a notification channel that notifications can be posted to. This can also be used to restore a deleted channel and to update an existing channel's name, description, group, and/or importance.

The importance of an existing channel will only be changed if the new importance is lower than the current value and the user has not altered any settings on this channel.

The group of an existing channel will only be changed if the channel does not already belong to a group. All other fields are ignored for channels that already exist. It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `channel: `[NotificationChannelCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelCompat) | the channel to create. Note that the created channel may differ from this value. If the provided channel is malformed, a RemoteException will be thrown. |

### createNotificationChannelGroup

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

```
fun createNotificationChannelGroup(group: NotificationChannelGroup): Unit
```

Creates a group container for [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html) objects. This can be used to rename an existing group. It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `group: `[NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html) | The group to create |

### createNotificationChannelGroup

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

```
fun createNotificationChannelGroup(group: NotificationChannelGroupCompat): Unit
```

Creates a group container for [NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html) objects. This can be used to rename an existing group. It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `group: `[NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat) | The group to create |

### createNotificationChannelGroups

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

```
fun createNotificationChannelGroups(
    groups: (Mutable)List<NotificationChannelGroup!>
): Unit
```

Creates multiple notification channel groups. See [createNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroup(android.app.NotificationChannelGroup)). It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `groups: (`[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)`<`[NotificationChannelGroup](https://developer.android.com/reference/android/app/NotificationChannelGroup.html)`!>` | The list of groups to create |

### createNotificationChannelGroupsCompat

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

```
fun createNotificationChannelGroupsCompat(
    groups: (Mutable)List<NotificationChannelGroupCompat!>
): Unit
```

Creates multiple notification channel groups. See [createNotificationChannelGroup](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat)). It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `groups: (`[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)`<`[NotificationChannelGroupCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationChannelGroupCompat)`!>` | The list of groups to create |

### createNotificationChannels

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

```
fun createNotificationChannels(
    channels: (Mutable)List<NotificationChannel!>
): Unit
```

Creates multiple notification channels that different notifications can be posted to. See [createNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannel(android.app.NotificationChannel)). It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `channels: (`[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)`<`[NotificationChannel](https://developer.android.com/reference/android/app/NotificationChannel.html)`!>` | the list of channels to attempt to create. |

### createNotificationChannelsCompat

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

```
fun createNotificationChannelsCompat(
    channels: (Mutable)List<NotificationChannelCompat!>
): Unit
```

Creates multiple notification channels that different notifications can be posted to. See [createNotificationChannel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannel(androidx.core.app.NotificationChannelCompat)). It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `channels: (`[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)`!>` | the list of channels to attempt to create. |

### deleteNotificationChannel

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

```
fun deleteNotificationChannel(channelId: String): Unit
```

Deletes the given notification channel.

If you [create](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#createNotificationChannel(android.app.NotificationChannel)) a new channel with this same id, the deleted channel will be un-deleted with all of the same settings it had before it was deleted. It doesn't do anything on older SDKs which don't support Notification Channels.  

### deleteNotificationChannelGroup

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

```
fun deleteNotificationChannelGroup(groupId: String): Unit
```

Deletes the given notification channel group, and all notification channels that belong to it. It doesn't do anything on older SDKs which don't support Notification Channels.  

### deleteUnlistedNotificationChannels

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

```
fun deleteUnlistedNotificationChannels(
    channelIds: (Mutable)Collection<String!>
): Unit
```

Deletes notification channels for which ids are NOT given. This will NOT delete channels which are conversation children of the given channels. It doesn't do anything on older SDKs which don't support Notification Channels.  

| Parameters |
|---|---|
| `channelIds: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/index.html)`)`[Collection](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | the IDs of any channels which should NOT be deleted by this method. |

### from

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

```
java-static fun from(context: Context): NotificationManagerCompat
```

Get a [NotificationManagerCompat](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat) instance for a provided context.  

### getActiveNotifications

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

```
fun getActiveNotifications(): (Mutable)List<StatusBarNotification!>
```

Recover a list of active notifications: ones that have been posted by the calling app that have not yet been dismissed by the user or [cancel](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#cancel(java.lang.String,int))ed by the app.

StatusBarNotification object, including the original and supplied to (via and ) as well as a copy of the original object (via ).

From [Q](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#Q()), will also return notifications you've posted as an app's notification delegate via [notifyAsPackage](https://developer.android.com/reference/android/app/NotificationManager.html#notifyAsPackage(java.lang.String, java.lang.String, int, android.app.Notification)).  

| Returns |
|---|---|
| `(`[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)`<`[StatusBarNotification](https://developer.android.com/reference/android/service/notification/StatusBarNotification.html)`!>` | A list of [StatusBarNotification](https://developer.android.com/reference/android/service/notification/StatusBarNotification.html). |

### getCurrentInterruptionFilter

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

```
fun getCurrentInterruptionFilter(): Int
```

Gets the current notification interruption filter.

The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound \&vibration) and is applied globally.  

### getEnabledListenerPackages

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

```
java-static fun getEnabledListenerPackages(context: Context): (Mutable)Set<String!>
```

Get the set of packages that have an enabled notification listener component within them.  

### getImportance

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

```
fun getImportance(): Int
```

Returns the user specified importance for notifications from the calling package.  

| Returns |
|---|---|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | An importance level, such as [IMPORTANCE_DEFAULT](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#IMPORTANCE_DEFAULT()). |

### getNotificationChannel

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

```
fun getNotificationChannel(channelId: String): NotificationChannel?
```

Returns the notification channel settings for a given channel id. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannel

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

```
fun getNotificationChannel(channelId: String, conversationId: String): NotificationChannel?
```

Returns the notification channel settings for a given channel and [conversation id](https://developer.android.com/reference/android/content/pm/ShortcutInfo.html#getId()). Returns the channel for the channelId on older SDKs which don't support Conversations. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannelCompat

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

```
fun getNotificationChannelCompat(channelId: String): NotificationChannelCompat?
```

Returns the notification channel settings for a given channel id. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannelCompat

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

```
fun getNotificationChannelCompat(channelId: String, conversationId: String): NotificationChannelCompat?
```

Returns the notification channel settings for a given channel and [conversation id](https://developer.android.com/reference/android/content/pm/ShortcutInfo.html#getId()). Returns the channel for the channelId on older SDKs which don't support Conversations. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannelGroup

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

```
fun getNotificationChannelGroup(channelGroupId: String): NotificationChannelGroup?
```

Returns the notification channel group settings for a given channel group id. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannelGroupCompat

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

```
fun getNotificationChannelGroupCompat(channelGroupId: String): NotificationChannelGroupCompat?
```

Returns the notification channel group settings for a given channel group id. Returns `null` on older SDKs which don't support Notification Channels.  

### getNotificationChannelGroups

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

```
fun getNotificationChannelGroups(): (Mutable)List<NotificationChannelGroup!>
```

Returns all notification channel groups belonging to the calling app or an empty list on older SDKs which don't support Notification Channels.  

### getNotificationChannelGroupsCompat

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

```
fun getNotificationChannelGroupsCompat(): (Mutable)List<NotificationChannelGroupCompat!>
```

Returns all notification channel groups belonging to the calling app or an empty list on older SDKs which don't support Notification Channels.  

### getNotificationChannels

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

```
fun getNotificationChannels(): (Mutable)List<NotificationChannel!>
```

Returns all notification channels belonging to the calling app or an empty list on older SDKs which don't support Notification Channels.  

### getNotificationChannelsCompat

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

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

Returns all notification channels belonging to the calling app or an empty list on older SDKs which don't support Notification Channels.  

### notify

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

```
@RequiresPermission(value = Manifest.permission.POST_NOTIFICATIONS)
fun notify(
    notificationWithIdAndTags: (Mutable)List<NotificationManagerCompat.NotificationWithIdAndTag!>
): Unit
```

Post a number of notifications, to be shown in the status bar, stream, etc. Each notification will attempt to be posted in the order provided in the `
notificationWithIds` list. Each notification must have a provided id and may have a provided tag. This is the preferred method for posting groups of notifications, to improve sound and animation behavior.  

### notify

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

```
@RequiresPermission(value = Manifest.permission.POST_NOTIFICATIONS)
fun notify(id: Int, notification: Notification): Unit
```

Post a notification to be shown in the status bar, stream, etc.  

| Parameters |
|---|---|
| `id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the ID of the notification |
| `notification: `[Notification](https://developer.android.com/reference/android/app/Notification.html) | the notification to post to the system |

### notify

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

```
@RequiresPermission(value = Manifest.permission.POST_NOTIFICATIONS)
fun notify(tag: String?, id: Int, notification: Notification): Unit
```

Post a notification to be shown in the status bar, stream, etc.  

| Parameters |
|---|---|
| `tag: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | the string identifier for a notification. Can be `null`. |
| `id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the ID of the notification. The pair (tag, id) must be unique within your app. |
| `notification: `[Notification](https://developer.android.com/reference/android/app/Notification.html) | the notification to post to the system |