This project is an Android weather application built using Kotlin, Jetpack Compose, and clean architecture. It allows users to search for a city, display its current weather information, and persist the selected city across app launches.
- Home Screen: Displays weather information for a saved city, including temperature, condition, humidity, UV index, and "feels like" temperature.
- Search Functionality: Allows users to search for cities and view their weather details.
- City Persistence: Saves the selected city using DataStore for retrieval on app launch.
- Error Handling: Gracefully handles API errors and network connectivity issues.
- Clean Architecture: Follows MVVM architecture with modular and testable code.
- Dependency Injection: Utilizes dependency injection using Hilt for managing dependencies.
-
Clone the repository: git clone https://github.com/oluwadara-abijo/WeatherTracker.git
-
Open the project in Android Studio:
- Import the project into Android Studio.
-
Obtain a WeatherAPI.com API Key:
- Create a free account on WeatherAPI.com and obtain an API key.
-
Configure API Key:
- Create a file named
local.propertiesin the root directory of your project. - Add the following line to the file, replacing
YOUR_API_KEYwith your actual API key:
- Create a file named
-
Build the project:
- Build the project by clicking "Build" -> "Make Project" or using the keyboard shortcut (usually Ctrl+F9 or Cmd+F9).
-
Run the app:
- Run the app on an emulator or a physical device by clicking "Run" -> "Run 'app'" or using the keyboard shortcut (usually Shift+F10).
-
Search for a city:
- Enter the city name in the search bar and tap the search icon.
- Select a city from the search results.
-
View weather information:
- The home screen will display the current weather information for the selected city.
-
Persist city selection:
- The selected city will be saved and automatically loaded when the app is launched again.
- Kotlin
- Jetpack Compose
- Hilt (Dependency Injection)
- Retrofit (Networking)
- DataStore (Local Storage)
- WeatherAPI.com API
Contributions are welcome! Please feel free to open issues or pull requests.
This project is licensed under the MIT License
This project was created as part of an Android take-home test and may not be fully production-ready. It is intended to demonstrate the developer's skills and understanding of Android development principles.
