If I have a list of 50,000 items stored in my firebase reference, and 5 items have been added to that list since the last time the client was online and listening, which callback would I have to use such that it is only triggered for the 5 new items that have been added?
I have offline persistence enabled on my client with Firebase.getDefaultConfig().setPersistenceEnabled(true);
. I have a listener bound to an activity listening for children added to a reference. Everytime the activity is created onChildAdded
is called for all the data in the reference. Is it possible to make onChildAdded
and onChildRemoved
be called only for "diff" between my local cache and the data on the firebase server? Or if that's not possible, then to trigger only those onChild*
callbacks after the most recent update from firebase?