Supported on: Android SDK
1.0.33+How It Works
- You define remote config keys in the Console.
- The SDK fetches the bundle (Firestore + REST fallback) when the app starts and listens for live updates.
- Your app reads values via
AppDNA.remoteConfig.get(key)and the SDK serves the latest cached value. - When values change server-side, an
onChangedcallback fires so your UI can react.
Remote config values are cached locally and survive offline use. The cache uses a configurable TTL (default 1 hour) — see Offline Support for cache behavior.
Get a Value
The Android SDK exposes a single typed-as-Any? getter — cast to the concrete type you stored:
Any?. The SDK preserves the value shape the Console stored (string, number, boolean, list, map). Use as? casts to coerce to the expected type and default with ?: when the key is missing.
The top-level convenience method AppDNA.getRemoteConfig(key) is equivalent to AppDNA.remoteConfig.get(key).
Get All Values
Retrieve the entire config map:Map<String, Any> (empty map if config has not loaded yet).
Force Refresh
Force the SDK to fetch the latest configuration from the server, bypassing the TTL cache:AppDNA.forceRefreshConfig() is equivalent.
Listen for Changes
Register a callback that fires whenever remote config values change (live Firestore update or TTL refresh):When Config Refreshes
The SDK refreshes remote config automatically:- On app launch — if the cached config has expired (default TTL: 1 hour)
- On return from background — same TTL check
- Live Firestore updates — when the Console publishes new values, the SDK applies them immediately via the active real-time listener
The config TTL is configurable via
AppDNAOptions(configTTL = 1800L) (in seconds). The default is 3600 seconds (1 hour).Module Access
Module Methods
| Method | Signature | Description |
|---|---|---|
get | get(key: String): Any? | Get a remote config value by key |
getAll | getAll(): Map<String, Any> | Get a snapshot of all remote config values |
refresh | refresh() | Force a fresh fetch from the server (bypasses TTL) |
onChanged | onChanged(callback: (Map<String, Any>) -> Unit) | Register a callback for live config updates |
Targeting and Variants
Remote config values can be targeted by audience attributes (country, app version, user trait) or scoped to experiment variants. The SDK automatically resolves the correct value for the current user based on the active config bundle. No code changes are required — variant resolution is fully server-side.Full Example
Configuration in Console
Manage remote config in the AppDNA Console:- Navigate to Settings → Remote Config.
- Add a new key with a default value.
- Optionally add variants targeted by audience or experiment.
- Publish the config to push it to the SDK.
Remote config values are cached locally. To test new values immediately, call
AppDNA.remoteConfig.refresh() or wait for the TTL to expire.Next Steps
- Combine remote config with Experiments for A/B testing
- Use Feature Flags for typed boolean rollouts
- Configure Offline Support for cache TTL and fallback behavior

