# LocalUnmanagedSdkActivityLauncher

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.LocalUnmanagedSdkActivityLauncher)  
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)

*** ** * ** ***

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

<br />

```
class LocalUnmanagedSdkActivityLauncher<T : Activity> : LocalSdkActivityLauncher
```

<br />

*** ** * ** ***

| **This class is deprecated.**   
| This library is no longer supported.

Local implementation of an SDK Activity launcher. This launcher is not lifecycle-aware, meaning its resources need to be released manually by the caller to avoid memory leaks.  

|                                                                         See also                                                                          |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [LocalManagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher) |   |

## Summary

|                                        ### Public functions                                        |
|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)               | [dispose](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher#dispose())`()` Clears references used to launch activities.                                                                                               |
| `open suspend `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [launchSdkActivity](https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalUnmanagedSdkActivityLauncher#launchSdkActivity(android.os.IBinder))`(sdkActivityHandlerToken: `[IBinder](https://developer.android.com/reference/android/os/IBinder.html)`)` |

## Public functions

### dispose

```
open fun dispose(): Unit
```

Clears references used to launch activities. This method**must**be called once the launcher is not needed anymore to avoid memory leaks.

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

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

### launchSdkActivity

```
open suspend fun launchSdkActivity(sdkActivityHandlerToken: IBinder): Boolean
```  

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