This project was created at first as a solution for an assessment for Android developer role in a company. Then I decided to continue updating it using the latest tools and techniques.
You can use it as a reference for using the tools described at the end of this file.
If you want to contribute to this repository by reviewing my code, refactor it, or add new features, You are almost welcomed.
- First you need to create an account on OpenWeatherMap
- Then you need to create an API Key.
- In your gradle.properties file enter the code below:
apiKey = "{YOUR_API_KEY}"
- Please check that your device is connected to the internet.
- Tap on Add City button.
- Enter city name, Country code as shown in the screenshots above.
- Then city with it's related historical data will be cached in your device. So you can access it later without needing to internet connection.
- You can add cities as much as you want.
- Tab on your city name, then it will navigate to city historical screen.
- Tab on an item from the historical data items to navigate to the details screen.
- Kotlin - As a programming language.
- Coroutines - For multithreading while handling requests to the server and local database.
- Navigation Component - To handle app navigation.
- Multidex - To enable creating multi dex files because of using set of libraries that reached the maximum size of single dex file.
- Model-View-ViewModel(MVVM) - Offers an implementation of observer design pattern.
- Data Binding - It helps in decoratively binding UI elements of our layout to data source of our app.
- LiveData - notifies views of any database changes in an observer way.
- Retrofit - It is a type-safe REST client for Android, Java and Kotlin developed by Square. The library provides a powerful framework for authenticating and interacting with APIs and sending network requests with OkHttp.
- Room DB - To manage SQLite database easily and avoid a lot boilerplate code.
- Glide - It is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
- Timber - It helps in logging while debugging your app. and all logging code will not be embedded in the released APK.
- Hilt - It is arguably the most used Dependency Injection, or DI, framework for Android. Many Android projects use Dagger to simplify building and providing dependencies across the app. It gives you the ability to create specific scopes, modules, and components, where each forms a piece of a puzzle: The dependency graph.
- Clean Architecture - Applying Clean Architecture and Solid Principles to build a robust, maintainable, and testable application.
- MockWebServer - This library makes it easy to test that your app Does The Right Thing when it makes HTTP and HTTPS calls. It lets you specify which responses to return and then verify that requests were made as expected.
- Google Truth - Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others.
Please review the following license agreement