This is a small app that fetches data from the MetaWeather's public API and show weather information for 5 days including today. Tapping on the day shows temperature chart over the course of the day.
The app uses a lot of things from modern android development like:
- Kotlin
- Coroutines with Flow
- MVVM
- Material Components
- Data Binding
- Multi Module
- Jetpack Navigation with Safe Args
- Room Database for persistence
- Dagger2 for dependency injection
Some of the third party libraries that have been used for the ease of development:
- Fresco for Image loading
- MPAndroidChart for charting
- Mockk for mocking objects
- Retrofit, OkHttp and GSON for network communication and serialization
For the simplicity and focus more on the architecture and testability, I have not focused on some of the areas which can be improved. Here are some of them:
- Rather than setting hard-coded location of London, it can be dynamic by requesting user's approximate location and fetch weather for the user
- When there is no internet, a retry button should be provided which can try fetching the data again.
- There can be a
dependencies.gradle
where all the version's are mentioned and they can be managed from the central place. In future, it can be replaced with Kotlin DSL. - Unit test case coverage can be extended to
WeatherDetailsViewModel
andWeatherRepository