# SessionObserverContext

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/SessionObserverContext.kt+class:androidx.privacysandbox.ui.core.SessionObserverContext) 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)

*** ** * ** ***


```
public final class SessionObserverContext
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> This library is no longer supported.

A class containing information that will be constant through the lifetime of a `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver`.

When `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver#onSessionClosed()` is called for the associated session observers, the resources of the `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext` will be freed.

## Summary

| ### Public constructors |
|---|
| `[SessionObserverContext](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#SessionObserverContext(android.view.View,kotlin.collections.Set))( https://developer.android.com/reference/android/view/View.html view, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> supportedSignalOptions )` **This method is deprecated.** This library is no longer supported. |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** This library is no longer supported. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html>` | `[getSupportedSignalOptions](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#getSupportedSignalOptions())()` **This method is deprecated.** This library is no longer supported. |
| `final https://developer.android.com/reference/android/view/View.html` | `[getView](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#getView())()` **This method is deprecated.** This library is no longer supported. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#hashCode())()` **This method is deprecated.** This library is no longer supported. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#toString())()` **This method is deprecated.** This library is no longer supported. |

## Public constructors

### SessionObserverContext

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)

```
public [SessionObserverContext](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#SessionObserverContext(android.view.View,kotlin.collections.Set))(
    View view,
    @NonNull Set<@NonNull String> supportedSignalOptions
)
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#equals(kotlin.Any))(Object other)
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

### getSupportedSignalOptions

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)

```
public final @NonNull Set<@NonNull String> [getSupportedSignalOptions](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#getSupportedSignalOptions())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

Returns the signal options which are supported by the container hosting the UI session.

### getView

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)

```
public final View [getView](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#getView())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

Returns the view that is presenting content for the associated `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session`.

This value will be non-null if the `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session` and the `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver` are created from the same process. Otherwise, it will be null.

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#hashCode())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.

### toString

```
public @NonNull String [toString](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext#toString())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This library is no longer supported.