Load and display images from the internet

Apply architecture best practices to the app and use Coil to download and display images.

 

Architecture: The Data Layer

Video Optional

In this video, you'll learn about the data layer and its two basic components: repositories and data sources. We'll also cover data immutability, error handling, threading, testing, and more tricks and recommendations.

Add repository and Manual Dependency Injection

Codelab

Refactor the Mars Photos app and add a repository to organize how data sources interact with the rest of the app.

Load and display images from the internet

Codelab

In this codelab, you use the Coil library to load and display photos from the internet in your Android Compose app.

Practice: Build amphibians app

Codelab

Take an app that displays information about different amphibian species and use your knowledge of networking, JSON parsing, and view models to enable the app to use data from the network. The app receives its data from a custom API for this project and displays it in a list.

Project: Create a Bookshelf app

Codelab

Create an app that downloads and displays book images from the Google Books API.

What's next?

Video Optional

In this unit, you learned important topics, such as offloading work from the main thread by using coroutines and consuming REST services to work with remote data!

Quiz

Test your knowledge and earn your Load and display images from the internet badge.