# SessionExt

Added in 1.0.0

*** ** * ** ***


```
public final class SessionExt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Scene` | `https://developer.android.com/reference/androidx/xr/scenecore/SessionExt#(androidx.xr.runtime.Session).getScene()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/Session receiver)` Gets the `https://developer.android.com/reference/androidx/xr/scenecore/Scene` associated with this Session. |

## Public methods

### getScene

Artifact: [androidx.xr.scenecore:scenecore](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/SessionExt.kt+symbol:scene) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public static final @NonNull Scene getScene(@NonNull Session receiver)
```

Gets the `https://developer.android.com/reference/androidx/xr/scenecore/Scene` associated with this Session.

Accessing the scene in a destroyed activity can be dangerous.

The `Scene` is the primary interface for creating and managing spatial content. There is a single `Scene` instance for each `Session`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/xr/scenecore/Scene` |   |