Supported on: Android SDK
1.0.33+Check a Flag
isEnabled() returns false by default if the flag does not exist or config has not loaded. The top-level convenience method AppDNA.isFeatureEnabled("dark_mode") is equivalent.
Read a Variant Value
Some flags carry a typed payload beyond on/off (e.g., a tier name or rollout percentage). Read the value withgetVariant:
Any? (string, number, boolean, list, or map). Cast to the type the Console stored.
Module Access
Module Methods
Listen for Changes
Register a callback that receives every flag’s currentisEnabled value each time the SDK applies feature-flag or in-app-message configuration fetched from the server — at configure(), on each scheduled refresh (the config TTL and the background refresh worker), and on AppDNA.remoteConfig.refresh(). It fires after every such fetch even when no flag changed, and usually more than once per fetch (once for each flag or message document the SDK reads, and once when it prunes removed ones), so compare with the values you last acted on:
isEnabled value, as a Map<String, Boolean> — not just changed keys. Re-read whichever flags you care about and react accordingly. Callbacks add up: each one you register fires. You can register before configure, and a callback stays registered after shutdown() and fires again once configure runs.
Using Flags with Experiments
Feature flags and experiments work together. Gate a feature behind a flag, then run an experiment to test its impact:Full Example
Feature flags are managed in the Console under Settings → Feature Flags. Toggle a flag on or off and it takes effect at the next SDK config fetch — when the TTL elapses (default 1 hour), at the background refresh every 15 minutes, or at
AppDNA.remoteConfig.refresh() / AppDNA.forceRefreshConfig(). The SDK does not listen for flag changes in real time.Next Steps
- Combine with Experiments for A/B-tested rollouts
- Use Remote Config for richer value shapes
- Configure Offline Support for cache TTL behavior

