0

I need a suggestion for Adapter with Firebase real time insert on collection. FirestoreRecyclerAdapter loads all document if not limit is not set. I have seen some example for paging data with updating query but they have done it without FirestoreRecyclerAdapter. Officials also suggest to reuse and update Query range for pagination.

Anyway i can use FirestoreRecyclerAdapter with updating query for pagination. Does FirestoreRecyclerAdapter support updating query? I think not.

Then should i use just simple RecyclerView.Adapter like given example ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
  • Actually, I wrote that article, and yes, you can use the solution written there or you can use [FirestorePagingAdapter](https://github.com/firebase/FirebaseUI-Android/tree/master/firestore#using-the-firestorepagingadapter) to achieve pagination but unfortunately without real-time updates. – Alex Mamo Jun 16 '20 at 08:11
  • @AlexMamo so i can't update the query that passed in `FirestoreRecyclerAdapter`? . And thanks for that article its really helpful – Abu Yousuf Jun 16 '20 at 08:30
  • The `FirestorePagingAdapter` is apart of the `Firebase-UI` library and as Frank van Puffelen mentioned in his [answer](https://stackoverflow.com/questions/50273741/firestorepagingadapter-not-receiving-realtime-updates): *The FirestorePagingAdapter in the FirebaseUI library is designed to get data, not to listen for realtime updates.*. – Alex Mamo Jun 16 '20 at 08:43

0 Answers0