OpenWeather Android app consumes Open Weather APIs to show current weather and daily weather forecast of user's current location using Location permissions. A user can save location weather information as favorite. Show list of favorites as well as show favorite locations on a Google Map. The application also supports offline viewing of saved weather information.
- Android Studio with JDK 17
- Android Gradle Plugin 8.1+
- Kotlin 1.8+
- Clone the repository
- Get OpenWeather API
- Get Google Maps API
- Now add your Google Maps API key to the project at
local.properties
withMAPS_API_KEY
as the property - Also, add your OpenWeather API key to the project at
local.properties
withOPEN_WEATHER_API_KEY
as the property - Finally, add the base url
https://api.openweathermap.org/
tolocal.properties
withBASE_URL
as the property - Build the project (Disable Gradle offline if yo need to sync the dependencies)
This project has been implemented using a combination of tools and resources, some of which are;
-
Architecture of choice: MVVM - Model View View Model
-
CI/CD - Continuous Integration and Continuous Delivery: Github Actions
-
Dependencies + Third party libraries
- Kotlin - Kotlin is a cross-platform, statically typed, general-purpose high-level programming language with type inference
- Android Jetpack - Jetpack encompasses a collection of Android libraries that incorporate best practices and provide backwards compatibility in your Android apps.
- Kotlin Coroutines - Provides concept of suspending function providing a safer and less error-prone abstraction for asynchronous operations
- Dagger Hilt - Hilt provides a standard way to incorporate Dagger dependency injection into an Android application.
- Retrofit - A type-safe HTTP client for Android and the JVM
- Firebase crashlytics Helps you track, prioritize, and fix stability issues that erode your app quality.
- AndroidX Lifecycle
- Google maps - is part of the Google Play services platform and lets you include maps and customized mapping information in your app
- Google Places - Places SDK for Android allows you to build location-aware apps that respond contextually to the local businesses and other places near the user's device
- Dexter - Android library that simplifies the process of requesting permissions at runtime.
- OKHTTP - OkHttp is an HTTP client
- Logging Interceptor - Interceptors are a powerful mechanism that can monitor, rewrite, and retry calls
- Moshi - A modern JSON library for Kotlin and Java.
- Timber - A logger with a small, extensible API which provides utility on top of Android's normal Log class.
- Room Database - Room persistence library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
- Palette - Palette library provides a powerful and intuitive API for creating more engaging apps extracting prominent colors from images
-
Unit testing - A unit test verifies the behavior of a small section of code, the unit under test.
- Robolectric - Robolectric is a framework that brings fast and reliable unit tests to Android
- MockK - Supports regular unit tests allowing you to mock objects.
- Google Truth - Fluent assertions for Java and Android