# LocalManagedSdkActivityLauncher

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+class:androidx.privacysandbox.activity.client.LocalManagedSdkActivityLauncher) 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 final class LocalManagedSdkActivityLauncher<T extends Activity & LifecycleOwner> implements LocalSdkActivityLauncher
```

<br />

*** ** * ** ***

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

Local implementation of a lifecycle-aware SDK Activity launcher. Its resources will be automatically disposed when its parent activity is destroyed. In this case, no additional work will be required from the caller.

It allows callers in the app process to dispose resources used to launch SDK activities.

## Summary

| ### Public methods |
|---|---|
| `void` | `[dispose](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#dispose())()` **This method is deprecated.** This library is no longer supported. |
| `boolean` | `[launchSdkActivity](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#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. |

## Public methods

### dispose

```
public void [dispose](https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#dispose())()
```

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

Clears references used to launch activities. This method **doesn't need** to be called as system will automatically dispose the launcher when the parent activity is destroyed. However, the user **can** optionally call it the launcher is not needed anymore.

After this method is called all further attempts to launch activities wil be rejected, and `https://developer.android.com/reference/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#launchSdkActivity(android.os.IBinder)` will return 'false'.

Doesn't do anything if the launcher was already disposed of.

### launchSdkActivity

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/privacysandbox/activity/core/SdkActivityLauncher#launchSdkActivity(android.os.IBinder)` |   |