Intro To Android (Workbook 2)

Lab: AsyncTask

We'll be working off of this tutorial to write our AsyncTask and interact with the network to fetch data: Connecting to the Network

We will be fetching data from http://107.170.189.86:8000/colabug/localfood.json

After we fetch the data, we'll need to parse it using GSON. Once we receive and parse this data, we should be able to use it in memory to display our views.

Process Overview

  1. Obtain json sample
  2. Use JSONSchema2Pojo to create Java POJOs
  3. Download the POJO jar and unzip
  4. Copy your files into the project (keep the names the same!)
  5. If you had information or functionality you liked from in your dummy models, then migrate them to the new files.
  6. Delete the old model files
  7. Use GSON to automatically parse and fill your POJOs
  8. Populate views with your newly downloaded data.