Firebase + Android - Notifications ChildAdded - How to get only New Childs?

前端 未结 3 881
既然无缘
既然无缘 2021-02-03 13:46

I\'m trying to setup an Android Service in my app that listens for new Childs in a Firebase Ref, and throws a Notification when that happens.

I\'m having issues because

3条回答
  •  没有蜡笔的小新
    2021-02-03 13:55

    If you have a field modifiedOn, you can index that and setup a query like:

    Query byModified = firebaseEndpoint.orderByChild("modifiedOn").startAt(lastInAppTime);
    

提交回复
热议问题