initialize
Initializes the Switchboard SDK with the given configuration.
Return
A result indicating success, or an error if initialization failed.
Parameters
context
The Android application context.
config
The configuration map.
fun initialize(context: Context, appId: String, appSecret: String, extensions: Map<String, Any> = emptyMap()): SwitchboardResult<Unit>
Initializes the Switchboard SDK with the given credentials and extensions.
Convenience overload that builds the configuration from the application credentials and an optional map of extension configurations.
Return
A result indicating success, or an error if initialization failed.
Parameters
context
The Android application context.
appId
The application ID.
appSecret
The application secret.
extensions
A map of extension configurations, keyed by extension name. Defaults to empty.