# SandboxedUiAdapter.SessionClient

Artifact:[androidx.privacysandbox.ui:ui-core](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui)  
[View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/ui/core/SandboxedUiAdapter.kt+class:androidx.privacysandbox.ui.core.SandboxedUiAdapter.SessionClient)  
Added in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  
Deprecated in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient "View this page in Java")

<br />

```
interface SandboxedUiAdapter.SessionClient
```

<br />

*** ** * ** ***

| **This interface is deprecated.**   
| This library is no longer supported.

The client of a single session that will receive callback events from an active session.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onResizeRequested](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onResizeRequested(kotlin.Int,kotlin.Int))`(width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the provider of content would like the UI to be presented at[width](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onResizeRequested(kotlin.Int,kotlin.Int))and[height](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onResizeRequested(kotlin.Int,kotlin.Int)). |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSessionError](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onSessionError(kotlin.Throwable))`(throwable: `[Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)`)` Called to report a terminal error in the session.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSessionOpened](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onSessionOpened(androidx.privacysandbox.ui.core.SandboxedUiAdapter.Session))`(session: `[SandboxedUiAdapter.Session](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session)`)` Called to report that the session was opened successfully, delivering the[Session](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session)handle that should be used to notify the session of UI events.                                                                                                                                             |

## Public functions

### onResizeRequested

Added in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  
Deprecated in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  

```
fun onResizeRequested(width: Int, height: Int): Unit
```

Called when the provider of content would like the UI to be presented at[width](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onResizeRequested(kotlin.Int,kotlin.Int))and[height](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient#onResizeRequested(kotlin.Int,kotlin.Int)). The library tries to get as close a fit as possible whilst staying within the container's constraints.  

### onSessionError

Added in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  
Deprecated in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  

```
fun onSessionError(throwable: Throwable): Unit
```

Called to report a terminal error in the session. No further events will be reported to this[SessionClient](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.SessionClient)and any further or currently pending calls to the[Session](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session)that may have been in flight may be ignored.  

### onSessionOpened

Added in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  
Deprecated in[1.0.0-alpha17](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha17)  

```
fun onSessionOpened(session: SandboxedUiAdapter.Session): Unit
```

Called to report that the session was opened successfully, delivering the[Session](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session)handle that should be used to notify the session of UI events.