-
Notifications
You must be signed in to change notification settings - Fork 0
Debug UI
Featured ships a Compose-based debug screen that lets developers and QA override flag values at runtime without recompiling. It is built from two modules that must only be included in debug builds.
// build.gradle.kts
debugImplementation("dev.androidbroadcast.featured:featured-registry")
debugImplementation("dev.androidbroadcast.featured:featured-debug-ui")Never include these in implementation or releaseImplementation — they are intended exclusively for debug builds.
Call FlagRegistry.register(…) once at app startup (e.g., in Application.onCreate) inside a debug-only guard:
import dev.androidbroadcast.featured.registry.FlagRegistry
if (BuildConfig.DEBUG) {
FlagRegistry.register(GeneratedLocalFlags.newCheckout)
FlagRegistry.register(GeneratedLocalFlags.maxCartItems)
}Register every flag you want visible in the debug screen. Flags not registered here will not appear.
Navigate to FeatureFlagsDebugScreen from your in-app debug menu (a drawer, a shake gesture, a long-press shortcut, or a dedicated debug activity):
import dev.androidbroadcast.featured.debugui.FeatureFlagsDebugScreen
@Composable
fun DebugMenuScreen(configValues: ConfigValues) {
FeatureFlagsDebugScreen(configValues = configValues)
}The screen lists all registered flags with their current values and sources. Tapping a flag opens an inline editor to set an override. The override is written through configValues.override(…) and persists until configValues.resetOverride(…) or configValues.clearOverrides() is called.
All 5 registered flags grouped by category (ui, Other, promotions, checkout). Boolean flags show a toggle with their source badge (LOCAL or DEFAULT).

main_button_red toggled to OFF. The toggle turns grey, the LOCAL badge stays, and a Reset link appears below to restore the default.
