Weather App is a sleek and modern Android application that fetches real-time weather data using the OpenWeatherMap API. It provides users with up-to-date weather information, including temperature, humidity, wind speed, and more, based on their location or a searched city. The app is designed to showcase best practices in modern Android development, clean architecture, and robust testing.
The codebase emphasizes the following key technologies and practices:
- ViewBinding - For type-safe view interaction.
- Navigation Components - Seamless navigation using Fragments.
- LiveData & ViewModel - For lifecycle-aware data management.
- Dagger 2.0 - Dependency injection without Hilt for modularity and testability.
- Retrofit - For efficient API communication.
- Room - Local data storage and caching.
- Paging3 - For handling large datasets efficiently.
- Kotlin Coroutines - Asynchronous programming made easy.
- Material Design - A modern and responsive UI.
- Mockito & JUnit - For unit and integration testing.
- Timber - For streamlined logging.
- Firebase Crashlytics - For monitoring app stability.
- Coil - For efficient image loading.
- Shimmer - For smooth loading animations.
The goal of this project is to demonstrate how to build a high-quality Android app using modern tools and libraries while maintaining clean, testable, and maintainable code.
To build and run this project, you’ll need the latest version of Android Studio (preferably Arctic Fox or newer).
To fetch weather data, you’ll need an API key from OpenWeatherMap. Follow these steps:
- Sign up on OpenWeatherMap and generate an API key.
- Add the API key to your
local.properties
file:OPENWEATHER_API_KEY = <INSERT_YOUR_API_KEY>
- Build the app 🎉
The app uses MVVM [Model-View-ViewModel] architecture to ensure a clean separation of concerns, testability, and maintainability. Here’s a high-level overview:
Read more:
Emmanuel Iyke
- GitHub: @Emmanueldav
- LinkedIn: Emmanuel Iyke
- Email: [email protected]
This project is licensed under the Apache License 2.0. See the LICENSE file for details.