Download presentation
Presentation is loading. Please wait.
Published byElaine Owens Modified over 9 years ago
1
Which Jacket? An app by Ashley Kaminski
2
Yet another weather app… …but this one gives you relevant data! Returns the current weather and the weather in 3 hours Suggests a jacket to wear at both times Changes its suggestion based on current conditions
3
Weather Data Provided via wunderground.com’s weather API Get request using any number of parameters Returns data in JSON or XML format
4
How it works User enters zipcode Zipcode is entered into correct URL to send GET request in AsyncTask Meanwhile, GUI switches from input screen to data screen
5
How it works Once the data is returned, the JSON is parsed in a different AsyncTask "local_time_rfc822":"Fri, 12 Oct 2012 14:33:51 -0400", "local_epoch":"1350066831", "local_tz_short":"EDT", "local_tz_long":"America/New_York", "local_tz_offset":"-0400", "weather":"Clear", "temperature_string":"70.9 F (21.6 C)", "temp_f":70.9, "temp_c":21.6, "relative_humidity":"-999%", "wind_string":"From the WNW at 5.0 MPH Gusting to 12.0 MPH", "wind_dir":"WNW", "wind_degrees":293, "wind_mph":5.0, "wind_gust_mph":"12.0", "wind_kph":8.0, "wind_gust_kph":"19.3"
6
How it works This Task creates a Jacket element, which stores the weather data and also computes the suggested jacket public class Jacket { private long currentTemp; private String futureTemp; private String currentConditions; private String futureConditions; private String currentJacket; private String futureJacket; private boolean currentUmbrella; private boolean futureUmbrella; private String location;
7
How it works UI is updated via callback
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.