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