How do I invoke to load the next page to append my database when I reached the last item on
val lazyPagingItems = viewModel.getAllItems().collectAsLazyPagingItems()
How do I invoke to load the next page to append my database when I reached the last item on
val lazyPagingItems = viewModel.getAllItems().collectAsLazyPagingItems()
Automatic loading of more items when you reach the end of the list is part of paging. Here's an article you can read that will show you the steps:
As @Johann already mentioned in his answer, the mechanism to load more pages are present in the Paging library. If you consider at some point in time trying using Cloud Firestore, then for sure the following article will help:
And here is the corresponding repo.