UIClientFactory

interface UIClientFactory

Factory for creating, retrieving, and destroying UIClient instances.

Access the factory through UIClient.Factory. The factory maintains a singleton UIClient -- only one instance exists at a time. Calling create with the same UIConfiguration returns the existing instance. To switch deployments or conversations, call destroy first.

When using the same com.salesforce.android.smi.core.CoreConfiguration in both this factory and com.salesforce.android.smi.core.CoreClientFactory, the UIClient shares the same underlying com.salesforce.android.smi.core.CoreClient instance. This allows the host app to perform operations on the active client even when the UI is not displayed.

See also

Functions

Link copied to clipboard
abstract fun create(configuration: UIConfiguration): UIClient

Creates or retrieves a UIClient for the given configuration.

Link copied to clipboard
abstract fun destroy()

Destroys the current UIClient singleton and releases its resources.

Link copied to clipboard
abstract fun instance(): UIClient?

Returns the current UIClient singleton if one has been created, or null otherwise.