Steps to setup firebase database to your Android project.

Kavindu Chethani
SLIIT Women In FOSS Community
3 min readMay 20, 2022

Let’s look at how to use Android Studio to set up a Firebase database for an Android project.

Step 01.

First , you have to create new project in android studio.

Step 02.

After that go to firebase console, use this link https://console.firebase.google.com/?pli=1 and Click Add Project icon.

Step 03.

Enter your project name and click continue button.

Step 04.

Turn on Enable Google Analytics for this project and click the Continue button.

Step 05.

Select Defualt Account for Firebase and click the create the project button. And it’s take few minutes to create your project.

Step 06.

Click continue button to start your project.

Step 07.

You will navigate to this dashboard, then click the android icon to add your android project.

Step 08.

In here you need to add your android package name, To that you have to go to your android studio project. Path: Android Project -> Gradle Scripts -> build.gradle(Module: app).

Step 09.

In build.gradle(Module: app), you can see applicationId: “com.packagename.projectname” like that. you have to copy the com.packagename.projectname like this and paste on Android package name on step 08.

Step 10.

Download the google-services-json file in here.

Step 11.

Add that downloded json file to your android studio project.

Android Project -> app

The Firebase configuration file has now been successfully added.

You’ve now connecting to the Firebase database. Make sure to follow all the steps correctly. Thank you for reading.

--

--

SLIIT Women In FOSS Community
SLIIT Women In FOSS Community

Published in SLIIT Women In FOSS Community

Empowering the potential and the contribution of women towards Free and Open Source software (FOSS).

Kavindu Chethani
Kavindu Chethani

Written by Kavindu Chethani

IT undergraduate | DEV enthusiastic