Skip to content Skip to sidebar Skip to footer

Determining If Firebase Didn't Download Data With Startat And Endat

I'm trying to download data with Firebase. The issue is that I'm downloading the data based off of a timestamp. If their is only one item in my ListView that I'm populating, I want

Solution 1:

You cannot know when getting the data from the database is completed becase Firebase is a real-time database and getting data might never complete. That's why is named a realtime database because in any momemnt the database can be changed, items can be added or deleted.

The only way to partially know if you have all the data at a particular location is to perform a single 'value' type query on it. Even then, the data may change after that listener is invoked, so all you really have is a snapshot at a particular moment in time.

You can use a CompletionListener only when you write or update data in your database and you'll be notified when the operation has been acknowledged by the Firebase servers but you cannot use this interface when reading data.

Post a Comment for "Determining If Firebase Didn't Download Data With Startat And Endat"