This is a simple Android application that fetches and displays the current weather data for a given city. The app uses the OpenWeatherMap API to retrieve weather information, including temperature, humidity, wind speed, and more. The app also displays a weather icon based on the current weather.
- Search for weather by city name.
- Displays current weather conditions including:
- Temperature
- Feels Like Temperature
- Wind Speed
- Humidity
- Pressure
- Visibility
- Cloudiness
- Weather Description
- Weather Icon
To run this project locally, follow these steps:
-
Clone this repository:
git clone https://github.com/yourusername/weather-app.git
-
Open the project in Android Studio.
-
Add your OpenWeatherMap API key:
- Open
MainActivity.java
and replaceAPIKEY
with your actual OpenWeatherMap API key.
- Open
-
Build and run the app on an Android emulator or device.
The app uses the OpenWeatherMap API to fetch weather data. You will need an API key to access the service.
https://api.openweathermap.org/data/2.5/weather?q={city_name}&appid={API_KEY}&units=metric&lang=en