google-developer-training / basic-android-kotlin-compose-training-mars-photos

Solution code for Android Basics in Kotlin course
https://developer.android.com/courses/android-basics-kotlin/course?gclid=CjwKCAjw4c-ZBhAEEiwAZ105RTyT-iaLHzrhMBUXdMhO230ZDwOwxxI2x4RgK8DwBxK8t1h0wmU_QxoCi4YQAvD_BwE
Apache License 2.0
72 stars 66 forks source link
android kotlin

Mars Photos

Mars Photos app is a demo app that shows actual images of Mars' 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.

Pre-requisites

You need to know:

Getting Started

  1. Install Android Studio, if you don't already have it.
  2. Download the sample.
  3. Import the sample into Android Studio.
  4. Build and run the sample.

Build this app through hands-on codelabs in the Android Basics with Compose Course

Get data from the internet

Learn how to use community-developed libraries to connect to a web service to retrieve and display data in your Android Kotlin compose app.

Add repository and Manual DI

Learn how to improve the architecture of the app by separating the network calls into a repository.

Load and display images from the internet

Use the Coil library to load and display photos from the internet in your Android Compose app.