christmas sale

Flat 10% off on the purchase of any two apps or more. Use coupon code - FESTIVAL10

Grab It Now
Check Mobile App
Read now
Start a Project

accessing firebase realtime database in android


Hello everyone,

Nowadays every other android developer is using firebase in some form be it their interface for notifications in your app, their realtime database or their authentication methods. these are just a few example of the much bigger list of the services that firebase provides.

We in this blog are particularly interested in using the database feature that firebase provides and is known as the firebase realtime database. Using this feature is really easy if you know how exactly to do it , else you will find it really difficult to handle .

Steps  to follow to get you started :
1) Register your project on the firebase console.

2) Download the google json provided.

3) Upgrade your build.gradle (app module) with the following dependencies.

P.S : A brief introduction to these dependencies :

‘’ is the default package name that allows you to import the firebase dependencies.

firebase-database : allows you to read the unique link provided to your database in the google service json you just downloaded.

firebase-core: allows you to get the core functionalities you will be using in your project to access the database.

After you have downloaded the json file all you need to do is calll a reference to your database and firebase has made that really simple. Just one line :

Congratulations, you have got access to your database and now you can use it as per your need.

Now in order to write to your data base you just need to push it , but you need to keep in mind that this database is a noSQL database and recieves the structure in JSON format. so you need to structure your database very nicely in order to achieve what exactly you want to do.

We will look in other coming blogs on how exactly to read and write data into your database.


Keep coding and keep sharing. : )


. . .

Leave a Comment

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


  • Writing data to your firebase realtime database - Mobikul
    […] For seeing last blog, click here […]
  • css.php

    When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

    Michael Urresta

    Michael Urresta

    Talk to Sales


    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home