Search code examples
androidfirebasefirebase-realtime-databasegoogle-cloud-firestoreandroid-architecture-components

The new paging library can also work with Firebase?


The new paging library can also work with Firebase real-time database or Cloud Firestore? I know that it works asynchronously but is there any way it can work with a real-time database?

Thanks!


Solution

  • Regarding Firestore, you can use FirestorePagingAdapter:

    The FirestorePagingAdapter binds a Query to a RecyclerView by loading documents in pages. This results in a time and memory efficient binding.

    The FirestorePagingAdapter is built on top of the Android Paging Support Library.