Skip to content

theianmay/mars-photos-app

Mars Photo Viewer

An Android app built in Kotlin that displays real Mars rover photos from NASA's public REST API.

This project demonstrates the use of modern Android development practices, including:

  • Retrofit for making RESTful API calls
  • Moshi for parsing JSON into Kotlin data classes
  • Coil for efficient image loading
  • ViewModel and LiveData for lifecycle-aware data handling
  • Coroutines for background network operations
  • Data Binding with custom binding adapters for cleaner UI logic

📚 What I Learned

While building this app, I deepened my understanding of:

  • Asynchronous programming with coroutines and lifecycle-aware components
  • Structuring apps using Android’s recommended MVVM architecture
  • Networking best practices in Android apps
  • Efficient image handling and caching
  • Declarative UI binding using XML + Data Binding

🔧 Tech Stack

  • Language: Kotlin
  • Architecture: MVVM
  • Networking: Retrofit + Moshi
  • Image Loading: Coil
  • Lifecycle: ViewModel, LiveData
  • UI: XML Layouts with Data Binding
  • Concurrency: Kotlin Coroutines

📸 Screenshots

Home Screen Loading State Image Detail
home loading detail

🚀 Getting Started

To run this app locally:

  1. Clone the repository
  2. Open in Android Studio
  3. Build and run on an emulator or physical device with internet access

🌐 API Source

This app uses NASA’s Mars Rover Photos API to fetch real-time rover images.

Credit to Google Developer Training

About

Android app that fetches and displays real Mars rover images from NASA using Retrofit, Moshi, and Coil.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages