[android-components](../../index.md) / [mozilla.components.support.base.ids](../index.md) / [androidx.core.app.NotificationManagerCompat](index.md) / [cancel](./cancel.md)

# cancel

`fun NotificationManagerCompat.cancel(context: <ERROR CLASS>, tag: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/base/src/main/java/mozilla/components/support/base/ids/SharedIdsHelper.kt#L80)

Cancel a previously shown notification.

Uses a unique [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) tag instead of an [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) id like [NotificationManagerCompat.cancel](#).

