Skip to content

Latest commit

 

History

History
97 lines (63 loc) · 4.22 KB

README.md

File metadata and controls

97 lines (63 loc) · 4.22 KB

Weather App

Welcome to the Weather App! This Android application provides accurate and up-to-date weather forecasts for any city in the world. The app uses data from the WeatherAPI to provide a 24-hour weather forecast for a selected city, with the background image changing dynamically based on whether it is day or night in that location. Additionally, the app now includes functionality to request location permission from the user and guide them to enable location services. Once location services are successfully enabled, the app will automatically display the weather for the user's current city.

Features

  • Current Location Support: The app can request location permission and prompt users to turn on location services, allowing the app to display the weather for the user’s current city.

  • Search by City: Users can search for any city by name to get the current weather and a 24-hour forecast.

  • 24-Hour Forecast: Detailed weather information for the next 24 hours, including temperature, humidity, wind speed, and more.

  • Dynamic Background: The background image changes to reflect day or night based on the selected city's local time.

  • User-Friendly Interface: Simple and intuitive design for a seamless user experience.

Video

Screenrecorder-2024-09-14-20-19-52-466.mp4

Screenshots

         

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Android Studio
  • A device or emulator running Android 7.1 (Nougat) or higher
  • An API key from WeatherAPI

Installing

  1. Clone the repository:

    git clone https://github.com/aaimran236/Weather-App
  2. Open the project in Android Studio:

    • Launch Android Studio.
    • Select "Open an existing Android Studio project".
    • Navigate to the directory where you cloned the repository and select it.
  3. Add your WeatherAPI key:

    • Obtain a free API key from WeatherAPI.

    • In Android Studio, open gradle.properties file (or create it if it does not exist).

    • Add your API key like this:

      WEATHER_API_KEY=your_api_key_here
  4. Build and run the project:

    • Connect your Android device or start an emulator.
    • Click the "Run" button in Android Studio.

Usage

  1. Launch the app on your device.
  2. Grant location permission when prompted and enable location services if necessary.
  3. The app will automatically display the weather for your current location.
  4. Alternatively, you can enter the name of a city in the search bar.
  5. View the current weather and the 24-hour forecast for the selected or detected city.
  6. Notice the background image changing based on whether it is day or night in the city.

Built With

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  • Fork the Project
  • Create your Feature Branch (git checkout -b feature/AmazingFeature)
  • Commit your Changes (git commit -m 'Add some AmazingFeature')
  • Push to the Branch (git push origin feature/AmazingFeature)
  • Open a Pull Request

License

This project is licensed under the MIT License - see the (https://en.wikipedia.org/wiki/MIT_License#:~:text=The%20MIT%20License%20is%20a,therefore%20has%20high%20license%20compatibility.) for details.

Acknowledgments

  • Thanks to WeatherAPI for providing the weather data.
  • Inspiration and design ideas from various weather apps and tutorials.

Contact

Project Link: [https://github.com/aaimran236/Weather-App]