Cached Configuration Provider
open class CachedConfigurationProvider(var context: Context, var shouldUseConfigurationCache: Boolean = true, var runtimeAppConfigurationProvider: RuntimeAppConfigurationProvider = RuntimeAppConfigurationProvider(context))
Base configuration provider that caches resolved values from braze.xml resources and runtime overrides.
Inheritors
Constructors
Link copied to clipboard
constructor(context: Context, shouldUseConfigurationCache: Boolean = true, runtimeAppConfigurationProvider: RuntimeAppConfigurationProvider = RuntimeAppConfigurationProvider(context))
Properties
Functions
Link copied to clipboard
Attempts to find the mapped value for the primary key, then the secondary key. A found value for the primary key will always take precedence over the secondary key. The configuration cache will update using the primary key, even if the secondary key has the mapped value.
Link copied to clipboard
Link copied to clipboard
fun getConfigurationValue(type: CachedConfigurationProvider.ResourceType, key: String, defaultValue: Any?): Any?
Performs retrieval of a given resource type from the varying levels of caches using the primary and secondary keys.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected fun getResourceConfigurationValue(type: CachedConfigurationProvider.ResourceType, key: String, defaultValue: Any?): Any?
Link copied to clipboard
private fun getResourceIdentifier(key: String?, resourceType: CachedConfigurationProvider.ResourceType): Int
Link copied to clipboard
protected fun getRuntimeConfigurationValue(type: CachedConfigurationProvider.ResourceType, key: String, defaultValue: Any?): Any?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Queries the context resources for a given resource identifier.
Link copied to clipboard
fun readResourceValue(type: CachedConfigurationProvider.ResourceType, key: String, defaultValue: Any?): Any?
Link copied to clipboard