How to add Firebase to your android app

For a beginner in previous days connecting android studio projects with firebase or google services was a big pain but not now with the new android studio you can connect your project directly to firebase in the android studio itself. With a nice user interface and simple steps, you can connect your project or app to firebase within a  minute. So today I will demonstrate How to add Firebase to your android project with services like firebase authentication, firebase analytics etc.  So let’s get started

1.  Create/open you android studio project in which you want to connect firebase

2. open tools=>firebase as shown in image below

connect firebase to android studio step one

3. Firebase panel with list of available services  will appear from right side of Android studio as shown in image below

connect firebase to android studio step 2

4. Now select which service you want. For example, i want to add firebase authentication to my project so select  authentication  from list as shown in image  below

connect firebase to android studio step 3

5.Now here you will be presented with the following screen. Select connect to firebase option

connect firebase to android studio step 4

6. popup dialog will appear with list of previously created projects as shown in image below. Select you want to create a new project or connect to the existing project and click on connect to firebase.

connect firebase to android studio step 5

7. Now it will start connecting to firebase and will download google-service.json file for us automatically as shown I image below.

connect firebase to android studio step 6

8. After a successful connection with firebase, a small popup will be shown at bottom of screen as shown in image below

connect firebase to android studio step 7

10. Now we are connected to firebase but we did not add firebase authentication to our project so to do that select second option add firebase authentication to your app as shown in the image below.

connect firebase to android studio step 8

11. Now android studio will show a popup stating changes going to happen in gradle files click on accept changes this will start synchronizing project with gradle files.

connect firebase to android studio step 9

12. After gradle build finished you will see Firebase panel will show status as connected and Dependencies setup correctly as shown in image below

connect firebase to android studio step  10

Now you are ready to user firebase authentication inside your project. To add other services follow the same procedure. If you are running into any problem use comment boxes below I will be happy to help you. Thank You! 🙂

Share this post

Hello there, My name is Amardeep founder of loopwiki.com. I have experience in many technologies like Android, Java, Php etc. In this variety of technologies, I love Android App Development. If you have any idea and you want me to develop for you then let’s have chat Email: [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *