WM

Weather Monitor

The goal of this project was to implement basic android development concepts in creating a weather application. The weather application allowed the user to view weather conditions in any one of the fifty states. The concepts of android development explored in the project were setting up basic UI components, creating a background service to query the open weather API and rendering queried data graphically using MPAndroidChart to create an aesthetically appealing application.

Project Overview

Constructed a service to collect weather data using an API call

An IntentService was created to query the open weather API for weather information regarding a specific state. An intent was used to send the name of the state the user selected from the main activity to the service. The service had an intent handler that used the name of the city selected to query the open weather map API to get weather data in JSON format. The JSON data consisted of the 5-day weather forecast with data points at 3-hour intervals. This data was parsed and extracted into another intent by the service. The data was then sent using the intent from the service to the main activity. The main activity populated the current weather list and forecast graph with the 5 day / 3 hour weather data.

Designed the user interface for selecting and rendering weather data

The first part of the UI was the spinner that was used to select one of the fifty states. The second part of the UI was a list of weather attributes for the selected state. The third UI attribute was a spinner used to select a specific weather attribute to see the five-day forecast. The fourth attribute was a line graph created using MPAndroidChart. The line graph rendered the five-day forecast with data points at every three hours of the attribute selected for a specific state. The x-axis of the line graph represented the time and the y-axis represented the units of either Humidity (%), Pressure (hPa), Temperature (℃) or Wind Speed (km/h).

Development was done in Android Studios using JAVA. The open weather maps API was used queried to obtain weather data.