Skip to content

feat(firebase-ai-logic-basics): update Android SDK setup and App Check guide - #219

Open
AustinBenoit wants to merge 1 commit into
ai-logic/2-core-structurefrom
ai-logic/2a-setup-android
Open

AustinBenoit wants to merge 1 commit into
ai-logic/2-core-structurefrom
ai-logic/2a-setup-android

Conversation

@AustinBenoit

@AustinBenoit AustinBenoit commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Scopes references/sdk/setup/android_setup.md to 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).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +200 to +202
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>`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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.

Comment on lines +232 to 236
// 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
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
// 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
}

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant