# SessionObserverFactory

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

<br />

*** ** * ** ***

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

A factory that creates `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver` instances that can be attached to a `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session`. Many `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver`s may be created for the same `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session`.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver` | `[create](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverFactory#create())()` **This method is deprecated.** This library is no longer supported. |
| `default @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>` | `[getSignalOptions](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverFactory#getSignalOptions())()` **This method is deprecated.** This library is no longer supported. |

## Public methods

### create

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)

```
abstract @NonNull SessionObserver [create](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverFactory#create())()
```

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

Called if a new `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session` has been opened by the `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter` that this factory is registered to. This will not be called for sessions that are already open.

### getSignalOptions

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)

```
default @NonNull Set<@NonNull String> [getSignalOptions](https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverFactory#getSignalOptions())()
```

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

The set of signals that should be collected for each `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter.Session`. This set of signals is defined by `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapterSignalOptions`.

The set of signals that are supported by the client will be sent in the `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserverContext` object in `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SessionObserver#onSessionOpened(androidx.privacysandbox.ui.core.SessionObserverContext)`.