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]
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]
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]
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]
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.
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]
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.
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.
Now it’s Done! Your Firebase is now connected with your Android Application.