Repository navigation
feat(firebase-ai-logic-basics): update Android SDK setup and App Check guide - #219
AustinBenoit wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Firebase AI Logic Android setup guide to reflect SDK renaming, clarify initialization, and provide detailed instructions for setting up App Check. The review feedback correctly identifies that the documentation incorrectly claims there is no supported way to inject a fixed debug token for normal emulator runs. The reviewer recommends restoring the firebaseAppCheckDebugSecret manifest placeholder configuration in both the explanatory text and the Gradle build file to prevent unnecessary token churn during local development.
| register the newly printed token. The Android SDK has no supported way to inject | ||
| a fixed token into a normal run (it does not read a manifest placeholder or | ||
| `<meta-data>`). |
There was a problem hiding this comment.
The statement that the Android SDK has no supported way to inject a fixed token into a normal run is incorrect. The Firebase App Check Android SDK supports injecting a debug token for normal runs using the firebaseAppCheckDebugSecret manifest placeholder (which is merged into the manifest as metadata and read by the debug provider). Removing this support forces developers to deal with debug token churn on every emulator reset or fresh install.
Please restore the manifest placeholder configuration and update the explanation accordingly.
| register the newly printed token. The Android SDK has no supported way to inject | |
| a fixed token into a normal run (it does not read a manifest placeholder or | |
| `<meta-data>`). | |
| register the newly printed token. Alternatively, you can inject a fixed token into a normal run using the firebaseAppCheckDebugSecret manifest placeholder. |
| // Instrumentation tests only (read by firebase-appcheck-debug-testing). | ||
| // Normal runs: the debug provider generates and logs its own token; no manifest placeholder exists. | ||
| if (appCheckDebugToken.isNotEmpty()) { | ||
| testInstrumentationRunnerArguments["firebaseAppCheckDebugSecret"] = appCheckDebugToken | ||
| } |
There was a problem hiding this comment.
Since the firebaseAppCheckDebugSecret manifest placeholder is indeed supported by the Firebase App Check SDK for normal emulator runs, we should restore this configuration in the defaultConfig block so developers can avoid token churn during local development.
| // Instrumentation tests only (read by firebase-appcheck-debug-testing). | |
| // Normal runs: the debug provider generates and logs its own token; no manifest placeholder exists. | |
| if (appCheckDebugToken.isNotEmpty()) { | |
| testInstrumentationRunnerArguments["firebaseAppCheckDebugSecret"] = appCheckDebugToken | |
| } | |
| // For normal emulator runs (injects into AndroidManifest) | |
| manifestPlaceholders["firebaseAppCheckDebugSecret"] = appCheckDebugToken | |
| // For instrumentation tests | |
| if (appCheckDebugToken.isNotEmpty()) { | |
| testInstrumentationRunnerArguments["firebaseAppCheckDebugSecret"] = appCheckDebugToken | |
| } |
Summary
references/sdk/setup/android_setup.mdto Android SDK installation (firebase-bom,firebase-ai,minSdk = 24),Firebase.ai(backend = GenerativeBackend.googleAI())/GenerativeBackend.agentPlatform(), Jetpack Compose vs. Views UI patterns, and Play Integrity + debug/CI App Check setup (useLimitedUseAppCheckTokens = true).