[android-components](../../index.md) / [mozilla.components.support.base.observer](../index.md) / [Consumable](index.md) / [onConsume](./on-consume.md)

# onConsume

`@Synchronized fun onConsume(listener: `[`ConsumableListener`](../-consumable-listener.md)`): `[`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/observer/Consumable.kt#L76)

Adds a listener to be invoked when this [Consumable](index.md) is consumed.

### Parameters

`listener` - the listener to add.