[android-components](../../../index.md) / [mozilla.components.feature.push](../../index.md) / [AutoPushFeature](../index.md) / [Observer](index.md) / [onMessageReceived](./on-message-received.md)

# onMessageReceived

`open fun onMessageReceived(scope: `[`PushScope`](../../-push-scope.md)`, message: `[`ByteArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/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/feature/push/src/main/java/mozilla/components/feature/push/AutoPushFeature.kt#L339)

A messaged has been received for the [scope](on-message-received.md#mozilla.components.feature.push.AutoPushFeature.Observer$onMessageReceived(kotlin.String, kotlin.ByteArray)/scope).

