# SharedUiAdapterFactory

# SharedUiAdapterFactory

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/SharedUiAdapterFactory.kt+class:androidx.privacysandbox.ui.client.SharedUiAdapterFactory)  
Added in[1.0.0-alpha16](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ui#1.0.0-alpha16)

*** ** * ** ***

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

<br />

```
@ExperimentalFeatures.SharedUiPresentationApi
object SharedUiAdapterFactory
```

<br />

*** ** * ** ***

Provides an implementation of[SharedUiAdapter](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SharedUiAdapter)created from a supplied Bundle which acts as a proxy between the host app and the Binder provided by the UI provider.

## Summary

|                                               ### Public functions                                                |
|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SharedUiAdapter](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SharedUiAdapter) | `@`[ExperimentalFeatures.SharedUiPresentationApi](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/ExperimentalFeatures.SharedUiPresentationApi) [createFromCoreLibInfo](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/client/SharedUiAdapterFactory#createFromCoreLibInfo(android.os.Bundle))`(coreLibInfo: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`)` Creates a[SharedUiAdapter](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SharedUiAdapter)from a supplied[coreLibInfo](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/client/SharedUiAdapterFactory#createFromCoreLibInfo(android.os.Bundle))that acts as a proxy between the host app and the Binder provided by the UI provider. |

## Public functions

### createFromCoreLibInfo

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

```
@ExperimentalFeatures.SharedUiPresentationApi
fun createFromCoreLibInfo(coreLibInfo: Bundle): SharedUiAdapter
```

Creates a[SharedUiAdapter](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SharedUiAdapter)from a supplied[coreLibInfo](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/client/SharedUiAdapterFactory#createFromCoreLibInfo(android.os.Bundle))that acts as a proxy between the host app and the Binder provided by the UI provider.  

|                                                             Throws                                                             |
|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.IllegalArgumentException](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html) | if`coreLibInfo`does not contain a Binder corresponding to[SharedUiAdapter](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ui/core/SharedUiAdapter) |