Check Mobile App
Read now
Start a Project

Firebase Realtime Database


Firebase Realtime Database

Database is an important part in our Project.Firebase realtime database allows data update,delete and store realtime data.It is an cloud hosted data which allows to store data in database as the form of NoSQL as JSON format and synchronized in realtime to every connected client.We don’t need to put any efforts in configuring the server, the Firebase will handle everything automatically and saves a big span of time and increase the productivity.

How it works in Realtime

In realtime it store data on cloud and notifies all devices in milliseconds

How it works in Offline

In offline it persist data in disk and when user comeback online all data will automatically synchronized.

Creating UserInfo class


Get Database Reference

To read and write into database we need to get Reference of database.

Read and Write data :

Write Data 

For writing data in database basically we use setValue() method on database reference path.This will create or update value on provided path.

The realtime database accepts multiple data types.StringLongDoubleBooleanMap<String, Object>List<Object> to store the data

 Read Data

For read data ,we use the ValueEventListener() method.


Delete Data

For Deleting Data you can we can use simpley removeValue() method


. . .

Leave a Comment

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


  • Vijay
    I am a new android developer . Help me to solve out my prob.
    How to trigger the createUser(String name,String mobile) method or it will automatically write data without triggering it.
    • Ashwani Yadav (Moderator)
      button.setOnClickListener(new View.OnClickListener() {
      public void onClick(View view) {
      createUser(“gfjfj” , “98555445666”); //You can add values from edit text
  • 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