问题
I'm developing an Android application and it's using the firebase to fetch its data. The onChildAdded() method in Firebase triggers off for all the children. Is there any hack to just get the newly added child alone?
PS: Each of the child has a date with it.
回答1:
You could save the last date you updated and then use it as reference to filter what is new.
来源:https://stackoverflow.com/questions/36648907/how-to-get-only-the-new-items-added-to-firebase