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

# cancel

`fun <ERROR CLASS>.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/NotificationIds.kt#L64)

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 [NotificationManager.cancel](#).

