
Firebase Remote Config Basics
Wire Firebase Remote Config into an Android app with Gradle, google-services.json, and Analytics-ready dependencies for feature flags and conditional rollouts.
Overview
firebase-remote-config-basics is an agent skill for the Build phase that configures Android Gradle and Firebase app assets to integrate Remote Config with Analytics-friendly targeting.
Install
npx skills add https://github.com/firebase/agent-skills --skill firebase-remote-config-basicsWhat is this skill?
- Requires firebase-basics skills for project and app creation first
- Android google-services.json placement and apps:sdkconfig CLI recovery path
- Project- and app-level Gradle Kotlin snippets for Google Services plugin 4.4.0
- Recommends Google Analytics for conditional targeting via audiences and user properties
- Firebase CLI login and apps:create flow aligned with official agent-skills bundle
- Google Services Gradle plugin version 4.4.0 referenced in setup snippets
Adoption & trust: 26k installs on skills.sh; 345 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Android app needs feature flags but Gradle, google-services.json, and Firebase app IDs are easy to miswire without a repeatable setup checklist.
Who is it for?
Indie Android developers adding Remote Config to an existing Firebase project using firebase-tools and Kotlin Gradle.
Skip if: iOS or Web Remote Config setup, server-side-only config, or teams with no Firebase project yet without running firebase-basics first.
When should I use this skill?
Android app needs Firebase Remote Config SDK wired after Firebase project/app exists or google-services.json is missing and must be fetched via CLI.
What do I get? / Deliverables
You get dependency-correct Gradle Kotlin blocks and verified google-services.json placement so Remote Config can load in the Android module.
- Updated build.gradle.kts plugin and dependency blocks
- Verified google-services.json placement
- Analytics-ready Remote Config dependency setup
Recommended Skills
Journey fit
Remote Config client integration belongs in Build when you connect the mobile app to Firebase backend services. Integrations covers SDK setup, Gradle plugin wiring, and console-linked app identity—not day-two flag tuning alone.
How it compares
Android integration checklist skill—not a generic feature-flag SaaS or code-review workflow.
Common Questions / FAQ
Who is firebase-remote-config-basics for?
Solo builders and small teams integrating Firebase Remote Config into Android apps via the official firebase/agent-skills collection in coding agents.
When should I use firebase-remote-config-basics?
Use it during Build integrations when google-services.json exists or after creating the Firebase Android app, before you implement fetch-and-activate logic in Kotlin.
Is firebase-remote-config-basics safe to install?
It instructs shell use of firebase-tools and Gradle edits; review the Security Audits panel on this page and avoid pasting production secrets into chat.
Workflow Chain
Requires first: firebase basics
SKILL.md
READMESKILL.md - Firebase Remote Config Basics
# Firebase Remote Config Android Setup Guide Important references: - Refer to the `firebase-basics` skills, particularly those for project and app setup, before proceeding. ## Project and App Setup Before you begin, ensure you have the following. If a `google-services.json` file is present, then use that Firebase project and app. Otherwise you may need to create them. - **Firebase CLI**: Installed and logged in (see `firebase-basics`). - **Firebase Project**: Created via `npx -y firebase-tools@latest projects:create` (see `firebase-basics`). - **Firebase App**: Created via `npx -y firebase-tools@latest apps:create <IOS|ANDROID|WEB> <package-name-or-bundle-id>` The `google-services.json` file must be present in the Android app's module directory. If missing, get the config using the Firebase CLI: `npx -y firebase-tools@latest apps:sdkconfig ANDROID <App-ID>`. ## Add Dependencies to Gradle Build These changes are made to your Android project's Gradle files. Google Analytics is highly recommended as it enables conditional targeting based on user properties and audiences. ### Project-level `build.gradle.kts` (`<project>/build.gradle.kts`) Ensure the Google Services plugin is in the `plugins` block: ```kotlin plugins { // ... other plugins id("com.google.gms.google-services") version "4.4.0" apply false } ``` ### App-level `build.gradle.kts` (`<project>/<app-module>/build.gradle.kts`) 1. Add the Google Services plugin to the `plugins` block: ```kotlin plugins { // ... other plugins id("com.google.gms.google-services") } ``` 2. Add the Firebase Remote Config and Analytics dependencies. Using the Firebase Bill of Materials (BoM) is the best practice for version management. ```kotlin dependencies { // ... other dependencies // Import the Firebase BoM implementation(platform("com.google.firebase:firebase-bom:32.7.0")) // Add the dependencies for Remote Config and Analytics implementation("com.google.firebase:firebase-config-ktx") implementation("com.google.firebase:firebase-analytics-ktx") } ``` ## Follow up Steps The following steps cover the essential patterns for using Remote Config effectively. ### Set In-App Defaults Define default values so your app has functional logic before it ever fetches a template from the server. Create an XML file (e.g., `res/xml/remote_config_defaults.xml`): ```xml <!-- Example Remote Config Defaults File --> <?xml version="1.0" encoding="utf-8"?> <defaultsMap> <entry> <key>welcome_message</key> <value>Welcome to the app!</value> </entry> <entry> <key>is_feature_enabled</key> <value>false</value> </entry> </defaultsMap> ``` Then, initialize the SDK in your Activity or Application class: ```kotlin val remoteConfig = Firebase.remoteConfig remoteConfig.setDefaultsAsync(R.xml.remote_config_defaults) ``` ### Fetch and Activate Values To apply values from the cloud, you must fetch them and then activate them. ```kotlin remoteConfig.fetchAndActivate() .addOnCompleteListener(this) { task -> if (task.isSuccessful) { val updated = task.result println("Config params updated: $updated") } else { println("Fetch failed") } // Access a value val message = remoteConfig.getString("welcome_message") } ``` # Firebase Remote Config iOS Setup Guide Important references: - Refer to the `firebase-basics` skills, particularly those for iOS setup, before proceeding. - Refer to the `xcode-project-setup` skills. ## Project and App Setup Use the `firebase-tools` CLI to set up the project if necessary. 1. **Find Bundle ID:** Read the Xcode project to find the iOS bundle ID. Check the `PRODUCT_BUNDLE_IDENTIFIER` value in the `.pbxproj` file or the `Info.plist` file. 2. **Create Fireba