# SdkActivityLauncher

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

*** ** * ** ***


```
public interface SdkActivityLauncher
```

<br />

Known direct subclasses [LocalSdkActivityLauncher](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalSdkActivityLauncher)

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

Known indirect subclasses [LocalManagedSdkActivityLauncher](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher), [LocalUnmanagedSdkActivityLauncher](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher)

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

*** ** * ** ***

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

Interface that allows SDKs running in the Privacy Sandbox to launch activities.

Apps can create launchers by calling `https://developer.android.com/reference/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0)` or `https://developer.android.com/reference/androidx/privacysandbox/activity/client/package-summary#(android.app.Activity).createUnmanagedSdkActivityLauncher(kotlin.Function0)` from one of their activities.

To send an `https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher` to another process, they can call `https://developer.android.com/reference/androidx/privacysandbox/activity/client/package-summary#(androidx.privacysandbox.activity.core.SdkActivityLauncher).toLauncherInfo()` and send the resulting bundle.

SDKs can create launchers from an app-provided bundle by calling `https://developer.android.com/reference/androidx/privacysandbox/activity/provider/SdkActivityLauncherFactory#fromLauncherInfo(android.os.Bundle)`.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `[launchSdkActivity](https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#launchSdkActivity(android.os.IBinder))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html sdkActivityHandlerToken)` **This method is deprecated.** This library is no longer supported. |

| ### Extension functions |
|---|---|
| `default final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLaunchers.[toLauncherInfo](https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#(androidx.privacysandbox.activity.core.SdkActivityLauncher).toLauncherInfo())( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher receiver )` **This method is deprecated.** This library is no longer supported. |

## Public methods

### launchSdkActivity

```
abstract boolean [launchSdkActivity](https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#launchSdkActivity(android.os.IBinder))(@NonNull IBinder sdkActivityHandlerToken)
```

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

Tries to launch a new SDK activity using the given `https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#launchSdkActivity(android.os.IBinder)`.

Returns true if the SDK activity intent was sent, false if the launch was rejected for any reason.

A valid `https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#launchSdkActivity(android.os.IBinder)` can be obtained by registering an SDK activity with androidx.privacysandbox.sdkruntime.core.controller.SdkSandboxControllerCompat.registerSdkSandboxActivityHandler.

## Extension functions

### SdkActivityLaunchers.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)

```
default final @NonNull Bundle SdkActivityLaunchers.[toLauncherInfo](https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#(androidx.privacysandbox.activity.core.SdkActivityLauncher).toLauncherInfo())(
    @NonNull SdkActivityLauncher receiver
)
```

> [!CAUTION]
> **This method 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.