Pagination in the REST API

Ever thought about how you can scroll your Instagram feed indefinitely?The answer to this is Paging. In this course, you will learn to implement paging to request a vast amount of data in your application.

If you have a large amount of data, is fetching all of the at once is a bad idea? Because your user only sees part of the data at one time, it does not make sense to get all the data at once. This is why we page the information in smaller chunks and fetch one piece at a time.
  • Author: Belal Khan
  • Level: Beginner
  • Video time: 60 minutes
  • Study time: 2 hours
  • Sample Project Included: Yes
  • Learning Path: Junior Developer

A few more words about this course

This course will teach us how to use a paginated API in our application. We will also use Paginated Adapters to render the information in our application.

Whenever we are paging the information we need to take care of a lot of things, for example:

1. When the information is being fetched from the remote show the user a paging state or placeholders
2. Fetch the next page when the user scrolls towards the bottom/fetch the previous when scrolling upwards.
3. Refresh the fetched list.

We wil learn all these things and we will also learn how to implement these using ViewModel architecture.
Drag to resize
By the end of the course you will have mastered:

  • What is paging
  • Defining a PagingSource
  • Fetching Paginated API
  • Configuring Your ViewModel to Fetch Data
  • Using a PagingData Adapter
  • Displaying Data in your UI
  • Using PagingSource
  • Using RemoteMediator
  • Displaying the Loading State
  • Breaking Free of Network Dependency

Meet the instructor

Drag to resize

Belal Khan

Google Developer Expert & Developer Advocate
Stream
About
I am a Google Developer Expert and currently working as a Developer Advocate at Stream. Prior to that I was a Senior Android developer at Wizely. I am  an expert in Android Application Development. Apart from this I believe in the power of Internet where anyone can share knowledge, and that's exactly what I have been doing since last 7 years. I keep sharing whatever I learn through my website and youtube channel. I mainly create contents about building android apps.