Mars Photos app is a demo app that shows actual images of Mar's surface. These images are real-life photos from Mars captured by NASA's Mars rovers. The data is stored on a Web server as a REST web service.
This app demonstrated the use of Retrofit to make REST requests to the web service, kotlinx.serialization to handle the deserialization of the returned JSON to Kotlin data objects, and Coil to load images by URL.
You need to know:
- How to create Composable functions.
- How to use architecture components including ViewModel.
- How to use coroutines for long-running tasks.
- Familiarity with lazy grid
- Install Android Studio, if you don't already have it.
- Download the sample.
- Import the sample into Android Studio.
- Build and run the sample.
Learn how to use community-developed libraries to connect to a web service to retrieve and display data in your Android Kotlin compose app.
Learn how to improve the architecture of the app by separating the network calls into a repository.
Use the Coil library to load and display photos from the internet in your Android Compose app.