# SessionConnectionReceiver

# SessionConnectionReceiver

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/ambient/crossdevice/sessions/SessionConnectionReceiver "View this page in Kotlin")\|Java

<br />

```
@RequiresApi(value = 26) interface SessionConnectionReceiver
```

<br />

*** ** * ** ***

Receiver callback for a[SessionRemoteConnection](https://developer.android.com/reference/com/google/ambient/crossdevice/sessions/SessionRemoteConnection).

## Summary

|                                                                                                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                                                                                                  ||
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract void` | [onMessageReceived](https://developer.android.com/reference/com/google/ambient/crossdevice/sessions/SessionConnectionReceiver#onMessageReceived(com.google.ambient.crossdevice.sessions.SessionParticipant,kotlin.ByteArray))`(` ` @`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull)` `[SessionParticipant](https://developer.android.com/reference/com/google/ambient/crossdevice/sessions/SessionParticipant)` participant,` ` @`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull)` byte[] payload` `)` Called when a message is received on the registered channel. |

## Public methods

### onMessageReceived

```
abstract void onMessageReceived(
    @NonNull SessionParticipant participant,
    @NonNull byte[] payload
)
```

Called when a message is received on the registered channel.