Course

Build a Weather App

In this course we will learn about a very common and important element of Android development: downloading data from the Internet! We will request weather forecast data from a free API provided by forecast.io. We will then parse that data (in JSON format) and display it in a single-page app. We will also see how to handle errors and situations when the network is unavailable.

Build a Weather App

6 Achievements

Exploring an API

Exploring an API

What is an API? What Does it Mean to Use One? This stage will introduce the project and explore an API provided by forecast.io.

0 of 7 Steps Complete
Networking

Networking

Even though we use the Web in lots of ways in our daily lives, communicating with the Web and interacting with the information we get is not a trivial task. Let's see how to make networking in Android easy with the help of a 3rd party library called OkHttp.

0 of 8 Steps Complete
Concurrency and Error Handling

Concurrency and Error Handling

Concurrency, or doing things together in parallel, is an important property of our system that let's us execute blocks of code simultaneously. In this stage, we take a look at what concurrency exactly means, why it's necessary, and how to make our networking call in a concurrent manner. We'll also learn how to gracefully handle any errors.

0 of 9 Steps Complete
Working with JSON

Working with JSON

Our weather data is in the JSON format, which is a way of representing data in a simple-to-read manner that is easily parsed and used by programming languages. In this stage we will learn how to parse that data and store it in Java model objects that we can use in our app.

Building the Weather UI

Building the Weather UI

With all the pieces in place we can finally display our forecast data in an interface designed by one of our Treehouse designers.

0 of 8 Steps Complete
Hooking up the Model to the View

Hooking Up the Model to the View

Our last task is to wire up the data from our CurrentWeather model to our freshly implemented user interface.

What you'll learn

  • Networking
  • OkHttp
  • Using an API
  • Parsing JSON
  • Using a DialogFragment

Instructor

  • Ben Jakuben

    Ben is a father, husband, son, friend, and teacher. He is firmly committed to the belief that the world is evolving to a better place. Find him on Twitter @benjakuben.

Download videos

You have to sign up for Treehouse in order to download course videos.

Sign up