# SharedUiAsset

Artifact: [androidx.privacysandbox.ui:ui-client](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/ui/client/view/SharedUiAsset.kt+class:androidx.privacysandbox.ui.client.view.SharedUiAsset) 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)

*** ** * ** ***

<br />

```
@ExperimentalFeatures.SharedUiPresentationApi
public final class SharedUiAsset
```

<br />

*** ** * ** ***

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

Represents an asset comprising a native ad. Each asset is associated with a `https://developer.android.com/reference/android/view/View.html` and has an assigned `https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#assetId()`. For `https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SandboxedSdkView`s, allows to provide a `https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter` for `https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiContainer` to manage the opening of a `https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SandboxedSdkView` session. However, the session will be closed by the container before the shared UI session in any case.

No user-sensitive information should be added to the asset registered on `https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiContainer` as it will be sent to the UI provider.

## Summary

| ### Public constructors |
|---|
| `[SharedUiAsset](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#SharedUiAsset(android.view.View,kotlin.String,androidx.privacysandbox.ui.core.SandboxedUiAdapter))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html view, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html assetId, https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter sandboxedUiAdapter )` **This method is deprecated.** This library is no longer supported. |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#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/lang/String.html` | `[getAssetId](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getAssetId())()` **This method is deprecated.** This library is no longer supported. |
| `final https://developer.android.com/reference/androidx/privacysandbox/ui/core/SandboxedUiAdapter` | `[getSandboxedUiAdapter](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getSandboxedUiAdapter())()` **This method is deprecated.** This library is no longer supported. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html` | `[getView](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getView())()` **This method is deprecated.** This library is no longer supported. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#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/client/view/SharedUiAsset#toString())()` **This method is deprecated.** This library is no longer supported. |

## Public constructors

### SharedUiAsset

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 [SharedUiAsset](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#SharedUiAsset(android.view.View,kotlin.String,androidx.privacysandbox.ui.core.SandboxedUiAdapter))(
    @NonNull View view,
    @NonNull String assetId,
    SandboxedUiAdapter sandboxedUiAdapter
)
```

> [!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/client/view/SharedUiAsset#equals(kotlin.Any))(Object other)
```

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

### getAssetId

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 String [getAssetId](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getAssetId())()
```

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

### getSandboxedUiAdapter

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 SandboxedUiAdapter [getSandboxedUiAdapter](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getSandboxedUiAdapter())()
```

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

### 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 @NonNull View [getView](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#getView())()
```

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

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/privacysandbox/ui/client/view/SharedUiAsset#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/client/view/SharedUiAsset#toString())()
```

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