Skip to main content

Configure Firebase for Android

Step 1: Create a Firebase project

Before you can add Firebase to your Android app, you need to create a Firebase project to connect to your Android app. Visit Understand Firebase Projects to learn more about Firebase projects.

Create a Firebase project

Android - How to get the Google Services Json

Android - How to get the Google Services Json

  1. In the Firebase console, click Add project.
    To add Firebase resources to an existing Google Cloud project, enter its project name or select it from the dropdown menu.
  2. Click Continue.
  3. Click Create project (or Add Firebase, if you’re using an existing Google Cloud project).

Step 2: Register your app with Firebase

To use Firebase in your Android app, you need to register your app with your Firebase project. Registering your app is often called “adding” your app to your project.

Android - How to get the Google Services Json

Android - How to get the Google Services Json

  1. In the center of the project overview page, click the Android icon Android or Add app to launch the setup workflow.
  2. Enter your app’s package name in the Android package name field.
    Find your app’s package name in your module (app-level) Gradle file, usually app/build.gradle (example package name: com.yourcompany.yourproject).
    Be aware that the package name value is case-sensitive, and it cannot be changed for this Firebase Android app after it’s registered with your Firebase project.
  3.  Enter other app information: App nickname

Step 3: Add a Firebase configuration file

Add the Firebase Android configuration file to your app:

Android - How to get the Google Services Json

  1. Click Download google-services.json to obtain your Firebase Android config file (google-services.json).
  2. Move your config file into the module (app-level) directory of your app.


Comments