# androidx.privacysandbox.activity.client

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalSdkActivityLauncher` | **This interface is deprecated.** This library is no longer supported. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher` | **This class is deprecated.** This library is no longer supported. |
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher` | **This class is deprecated.** This library is no longer supported. |

## Extension functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher<T>` | `<T : https://developer.android.com/reference/android/app/Activity.html & https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner> T.[createManagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0))( allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** This library is no longer supported. |
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher<T>` | `<T : https://developer.android.com/reference/android/app/Activity.html> T.[createUnmanagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createUnmanagedSdkActivityLauncher(kotlin.Function0))( allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** This library is no longer supported. |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/core/SdkActivityLauncher.[toLauncherInfo](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(androidx.privacysandbox.activity.core.SdkActivityLauncher).toLauncherInfo())()` **This function is deprecated.** This library is no longer supported. |

## Extension functions

### T.createManagedSdkActivityLauncher

Artifact: [androidx.privacysandbox.activity:activity-client](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/activity/client/SdkActivityLaunchers.kt+function:createManagedSdkActivityLauncher) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03)

```
fun <T : Activity & LifecycleOwner> T.[createManagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0))(
    allowLaunch: () -> Boolean
): LocalManagedSdkActivityLauncher<T>
```

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

Returns a lifecycle-aware SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context. The created launcher will be automatically disposed when the current activity is destroyed, with no additional work required.

| Parameters |
|---|---|
| `<T : https://developer.android.com/reference/android/app/Activity.html & https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner>` | the current `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` activity from which new SDK activities will be launched. If this activity is destroyed, any further SDK activity launches will simply be ignored, and `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#launchSdkActivity(android.os.IBinder)` will return 'false'. |
| `allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | predicate called each time an activity is about to be launched by the SDK, the activity will only be launched if it returns true. |

### T.createUnmanagedSdkActivityLauncher

Artifact: [androidx.privacysandbox.activity:activity-client](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/activity/client/SdkActivityLaunchers.kt+function:createUnmanagedSdkActivityLauncher) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03)

```
fun <T : Activity> T.[createUnmanagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createUnmanagedSdkActivityLauncher(kotlin.Function0))(
    allowLaunch: () -> Boolean
): LocalUnmanagedSdkActivityLauncher<T>
```

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

Returns a lifecycle-unaware SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context. The created launcher will need to be manually disposed explicitly by the caller.

It is recommended to use a lifecycle-aware launcher created using `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0)` instead. It is automatically disposed when the current activity is destroyed, making it less prone to memory leaks.

| Parameters |
|---|---|
| `<T : https://developer.android.com/reference/android/app/Activity.html>` | the current activity from which new SDK activities will be launched. If this activity is destroyed any further SDK activity launches will simply be ignored, and `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher#launchSdkActivity(android.os.IBinder)` will return 'false'. |
| `allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | predicate called each time an activity is about to be launched by the SDK, the activity will only be launched if it returns true. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0)` |   |

### SdkActivityLauncher.toLauncherInfo

Artifact: [androidx.privacysandbox.activity:activity-client](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/activity/client/SdkActivityLaunchers.kt+function:toLauncherInfo) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity#1.0.0-alpha03)

```
fun SdkActivityLauncher.[toLauncherInfo](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/package-summary#(androidx.privacysandbox.activity.core.SdkActivityLauncher).toLauncherInfo())(): Bundle
```

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

Returns a `https://developer.android.com/reference/android/os/Bundle.html` with the information necessary to recreate this launcher. Possibly in a different process.