Show current weather and 5 day forecast based on user location with open weather api
-Kotlin- a cross-platform, statically typed, general-purpose programming language with type inference.
-Coroutines - perform background operations.
-KOIN - a pragmatic lightweight dependency injection framework.
-ROOM - persistence library providing an abstraction over SQL .
Jetpack -
-Retrofit - A type-safe HTTP client for Android.
In your local.properties
you will need to add your Open Weather API key and copy the urls in.
OPEN_WEATHER_API_KEY = YOUR KEY
OPEN_WEATHER_BASE_URL=https://api.openweathermap.org
OPEN_WEATHER_ICONS_URL= http://openweathermap.org/img/wn/
Check for one under Api Keys
Environment
- Built on A.S Hedgehog
- JDK 17 -minSDK 26
The app follows MVVM Architecture and contains these packages:
data-remote
Handles data interacting with the network and is later serverd up to the presentation layer through domain object
data-local
Handles persistence of object with Room ORM from.This module is responsible for handling all local related logic and serves up data to and from the presentation layer through domain objects.
With this separation we can easily swap in new or replace the database being used without causeing major ripples across the codebase.
Gets data from api and room and distributes it to the rest of the app
Koin handles dependency injection on components making it easier to reuse
This package contains utility functions like networkresult which are used throughtout the application
contains views that are shown to the user
Clone the repo and run on emulator or phone or download the apk file