# SessionConnectionReceiver

# SessionConnectionReceiver

*** ** * ** ***

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

<br />

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

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                                                                                                                                               ### Public functions                                                                                                                                                                                                                                                                                               ||
|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://developer.android.com/reference/kotlin/kotlin/Unit) | [onMessageReceived](https://developer.android.com/reference/kotlin/com/google/ambient/crossdevice/sessions/SessionConnectionReceiver#onMessageReceived(com.google.ambient.crossdevice.sessions.SessionParticipant,kotlin.ByteArray))`(participant: `[SessionParticipant](https://developer.android.com/reference/kotlin/com/google/ambient/crossdevice/sessions/SessionParticipant)`, payload: `[ByteArray](https://developer.android.com/reference/kotlin/kotlin/ByteArray)`)` Called when a message is received on the registered channel. |

## Public functions

### onMessageReceived

```
fun onMessageReceived(participant: SessionParticipant, payload: ByteArray): Unit
```

Called when a message is received on the registered channel.