Retrieving data from firebase database in android
NickName:Kartik Ohri Ask DateTime:2016-03-07T23:54:10

Retrieving data from firebase database in android

I'm recently migrated to Firebase. I have gone through Firebase Android api docs for retrieving data from database through JSON. there is method onDataChange(DataSnapshot snapshot) to retrieve data whenever there is change in data in database but I could find how to retrieve data even if there is no change in database.

For example:- when a user logs into my app, I want that data which is stored under the unique id node should be retrieved. How can I retrieve data anytime from Firebase database if i want?

Copyright Notice:Content Author:「Kartik Ohri」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/35848136/retrieving-data-from-firebase-database-in-android

Answers
Frank van Puffelen 2016-03-07T16:28:16

From the Firebase guide on reading data:\n\n\n [the onDataChange() method is] triggered once with the initial data and again every time the data changes. \n\n\nI highly recommend that you read the Firebase guide for Android programming end-to-end. It'll answer many of the questions you're likely to have as you start using Firebase.",


More about “Retrieving data from firebase database in android” related questions

Retrieving data from firebase database in android

I'm recently migrated to Firebase. I have gone through Firebase Android api docs for retrieving data from database through JSON. there is method onDataChange(DataSnapshot snapshot) to retrieve data

Show Detail

Retrieving data from firebase realtime database for AutoCompleteTextView

I have already referred Retrieving data from Firebase Realtime Database in Android. My question is an extension to this. I am trying to use the data retrieved from firebase for AutoCompleteTextView

Show Detail

Retrieving data from particular nodes firebase Database

I am developing an android application and now I am stuck in retrieving data from particular nodes like I want to retrieve only one value from each nodes. The database structure shows below. How c...

Show Detail

Retrieving data from Firebase database to webView in Android

I am building an application with webView and Firebase as database, I have implemented both correctly but the problem is that my webView is not retrieving any data from Firebase database and is sho...

Show Detail

Firebase on android not retrieving data

I have been able to successfully upload and delete data from my firebase repo using the guide here: https://www.firebase.com/docs/android/guide/saving-data.html However if I try and retrieve the d...

Show Detail

Android Firebase Database - Retrieving data sorted by timestamp

I am developing an Android app that uses Firebase database. To use the app, the user has to create an account and log-in. I save the account info in Firebase Database. The app is retrieving the user

Show Detail

Retrieving data from firebase dynamically in android

I have my database structured like this in firebase: app root: user: uid1: some data uid2: some data helper: ...

Show Detail

Retrieving data from firebase in android in sorting order

first of all the code is work fine for me . data is retrieving from firebase finely i want see the last inserted data in top . but it's working reverse mode. here is code for retrieving . import

Show Detail

Problem with retrieving data from firebase

This is the error log i have a problem in retrieving data from firebase realtime database. java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map E/AndroidRuntime: FATAL

Show Detail

Android Studio - Retrieving data from firebase is not working

I'm working on retrieving some data from Firebase and i followed some Youtube tutorials that were working fine, but out of nowhere the retrieving is not working anymore, the path that i'm setting...

Show Detail