Repository and workManager

Learn how to create a repository, add an offline cache, and schedule background tasks with WorkManager by completing an app called DevBytes. This app displays a list of DevByte videos which are short tutorials made by the Google Android Developer Relations team. The app fetches a list of video URLs from the network using the Retrofit library and displays the list using a RecyclerView.


Add a Repository


Import the starter code for the DevBytes app. Improve the user experience for the app by implementing offline caching to display results from the local database instead of from the network. By using a cache, users will be able to use the app while their device is offline or if they have a slow network connection. Create a repository class to provide an architecturally clean API for data access to the rest of the app.



Use WorkManager to schedule a background task in an optimized and efficient way.

Repository and WorkManager Quiz

Test your knowledge of creating a repository, adding an offline cache, and scheduling background tasks with WorkManager to earn your Repository and WorkManager badge.