LocalManagedSdkActivityLauncher


class LocalManagedSdkActivityLauncher<T : Activity & LifecycleOwner> : LocalSdkActivityLauncher


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 functions

open Unit

Clears references used to launch activities.

open suspend Boolean
launchSdkActivity(sdkActivityHandlerToken: IBinder)

Public functions

dispose

open fun dispose(): Unit

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 LocalManagedSdkActivityLauncher.launchSdkActivity will return 'false'.

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

launchSdkActivity

open suspend fun launchSdkActivity(sdkActivityHandlerToken: IBinder): Boolean