Home / Companies / Firebase / Blog / Post Details
Content Deep Dive

Take Control of Your Firebase Init on Android

Blog post from Firebase

Post Details
Company
Date Published
Author
Doug Stevenson
Word Count
624
Company Posts That Month
10
Language
English
Hacker News Points
-
Post removed?
No
Summary

Firebase on Android is normally initialized automatically through the Google Services Gradle Plugin, which converts values from google-services.json into app resources that FirebaseInitProvider uses at startup. Apps with custom build systems such as Bazel, or those unable to use the plugin, can manually add the required Firebase configuration values to resource XML files using details from the plugin documentation. In the uncommon case where an app must choose a Firebase project at runtime, developers must prevent FirebaseInitProvider from being merged into the manifest by using a tools:node="remove" override, then initialize the default FirebaseApp themselves with FirebaseApp.initializeApp(Context, FirebaseOptions). Manual initialization should occur early, such as in a custom ContentProvider’s onCreate method, to preserve correct Analytics measurement, and FirebaseOptions can be built from project values found in google-services.json.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.