Skip to main content

updateConfig

Updates the user-specific configuration of the SDK. Changes will be reflected dynamically.

Overview

Call this method to update user-specific settings such as preferences, feature toggles, or other configuration options. The SDK will immediately apply these changes to its behavior and UI.

Method Signature

fun updateConfig(config: UserConfig)

Parameters

ParameterTypeDescription
configUserConfigUser-specific configuration settings

Return Value

This method does not return a value.

Example

// Update user configuration
fun onUserSettingsChanged(newSettings: UserPreferences) {
val userConfig = UserConfig(
// Map your settings to UserConfig
// Example properties (adjust based on actual UserConfig interface)
)

sdk.updateConfig(userConfig)
}

// Example: Update when user toggles a feature
fun onFeatureToggled(featureEnabled: Boolean) {
val config = UserConfig(
// feature settings
)
sdk.updateConfig(config)
}

Notes

  • Changes take effect immediately
  • Use this to dynamically update user preferences without restarting the SDK
  • The SDK UI will update to reflect the new configuration
  • This method can be called multiple times as settings change