CachedConfigurationProvider

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))

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
private var context: Context
Link copied to clipboard
Link copied to clipboard

A field specifying whether read configuration values will be put into a cache and thus always read from some live storage in some way.

Functions

Link copied to clipboard
fun getBooleanValue(primaryKey: String, defaultValue: Boolean): Boolean

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
fun getColorValue(primaryKey: String): Int?
Link copied to clipboard

Performs retrieval of a given resource type from the varying levels of caches using the primary and secondary keys.

Link copied to clipboard
protected fun getDrawableValue(primaryKey: String, defaultValue: Int): Int
Link copied to clipboard
private fun getFallbackConfigKey(key: String): String?
Link copied to clipboard
fun getIntValue(primaryKey: String, defaultValue: Int): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getStringSetValue(primaryKey: String, defaultValue: Set<String>?): Set<String>?
Link copied to clipboard
fun getStringValue(primaryKey: String, defaultValue: String?): String?
Link copied to clipboard

Queries the context resources for a given resource identifier.

Link copied to clipboard
Link copied to clipboard
internal fun resetCache()