LocalManagedSdkActivityLauncher


public final class LocalManagedSdkActivityLauncher<T extends Activity & LifecycleOwner> implements 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 methods

void

Clears references used to launch activities.

boolean
launchSdkActivity(@NonNull IBinder sdkActivityHandlerToken)

Public methods

dispose

public void dispose()

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

public boolean launchSdkActivity(@NonNull IBinder sdkActivityHandlerToken)