How to Connect Firebase to your Android Project [Step by Step Guide]

For all Android Developers, Firebase is an important part of their development process. But in a nutshell what is Firebase? Think like it as a platform which allows building web and mobile applications without a server-side programming language. You can store users data on its real-time database which sync data among users data in no time.

Firebase in Technical words

Firebase is a technology that allows you to make web applications with no server-side programming so that development turns out to be quicker and easier. It supports the web, iOS, OS X, and Android clients.

Android Apps using Firebase can utilize and control information, without thinking about how the information would be put away, and synchronized crosswise over different examples of the application in real time.

With Firebase, you don’t need to stress over-provisioning servers or building REST APIs with just a little bit of configuration; you can allow Firebase to make a chance to take every necessary step: storing data, verifying users, and implementing access rules.

There are various benefits of Firebase that relate to the core technology of advancement.

  • Firebase Real-time Database
  • Firebase Auth
  • Firebase Storage
  • Firebase Crash Report
  • Firebase App Indexing
  • Firebase Analytics
  • Firebase Test Lab for Android
  • Firebase Cloud Messaging
  • Firebase Notification
  • Firebase Remote Config

These are just a few of the benefits which I have listed above.

In this tutorial, I am going to teach you how you can connect and use Firebase with your very own Android Application

How to Connect Firebase to your Android Project

1. Open Android Studio and open the project in which you want to connect firebase.

2. After the project is opened, select Tools option from Menu >> Select the Firebase option [Fig.1]

1
Fig.1

3. It will open Assistant Tab on the right-hand side and you can select options as per your requirement. We have selected Authentication feature. [Fig.2]

Fig.2
Fig.2

4. After you clicked on any options, you can get 2 options to connect your app to firebase and add dependencies to your project. [Fig.3]

Fig.3
Fig.3

5. When You clicked on the button to connect to the firebase from [Fig.3] then you will see the dialogue box like this [Fig.4]

MUST READ: Google Login And Registration For Android Using Firebase Authentication

6. If you already created the project in firebase then you can choose an existing project other you can create a new firebase project.

7. Give the desired name of the project and click on the Connect to Firebase.

Fig.4
Fig.4

8. After you connected with the firebase then you have to add dependencies. For that click on the second option to add dependencies. [Fig.3]

9. When you click on that you get a dialogue box again and you have to click on Accept Changes. [Fig.5]

Fig.5
Fig.5

10. Once you connect Firebase to your Android Project you can see the changes in the gradle file.
As you can see in the [Fig.6] and [Fig.7] Firebase dependencies have been added.

Fig.6
Fig.6
Fig.7
Fig.7

11. To check whether google-services.json has added in your project for that you can go the Project Files then click on the app folder where you can see the google-services.json. 

Fig.8
Fig.8

Now it’s Done! Your Firebase is now connected with your Android Application.

Recent Articles

How To Set Up Multiple Monitors On Windows 10

Are you someone who uses multiple windows simultaneously? If yes, you definitely could use various monitors. It would not only make your...

8 Best Offline Football Games for Android 2020

Are you looking for the best offline football games? Football is one of the world's most popular games. Even it is one...

Samsung Galaxy S20+ leaked, image surface online

Just a few days beofre Samsung is going to showcase the new S20 series, Galaxy S20+ leaked images online somehow showing the...

Samsung Galaxy Note 10 lite: 2 Year old processor smartphone, Best Mid ranger?

Earlier this week Samsung unveiled Samsung Note 10 lite and Samsung Galaxy S10 lite. It was very surprising as Galaxy lineup has...

Easy Trick: How to Merge Finder windows in Mac

If you have used old MAC OS then you might remember you can't merge the windows and it was very difficult to work...

4 COMMENTS

  1. First of all I want to say wonderful blog! I had a quick question that I’d like to ask if you do not mind.
    I was interested to find out how you center yourself and clear your head before writing.
    I’ve had a difficult time clearing my thoughts in getting my thoughts out there.
    I do take pleasure in writing however it just seems like the first
    10 to 15 minutes are wasted just trying to figure out how to begin.
    Any ideas or hints? Thank you!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay on Top - Get the daily news in your inbox