Android Development for Beginners 10

App Inventor Parse JSONIn this tutorial I’ll walk you step-by-step through the process of using App Inventor to Parse JSON data. You have to watch the last tutorial to understand this one.

I’ll pull JSON weather data from Weather.gov and show how App Inventor organizes that data. I’ll then pull in specific data that we will use to create our Android weather app. I’ll also show you how to add padding to components in App Inventor. All of the blocks used can be found after the video below.

If you like videos like this, it helps to tell Google Plus with a click here

App Inventor Design View for Android Weather App

Click the image below to enlarge it to full screen.

App Inventor Design View for Android Weather App

App Inventor Blocks for Android Weather App

Click the image below to enlarge it to full screen.

App Inventor Blocks for Android Weather App

10 Responses to “Android Development for Beginners 10”

  1. israel says:

    Hello Derek,

    I want to thank you for the android app inventor series you have been doing during the last weeks. In fact, I know little of programming languages and this seems a lot easier for me to start. I also have a question for you regarding the apps that can be made with this program. Can these apps be sold ? and if so , how much could they be priced?

  2. Anonymous says:

    This is a great tutorial about using a public API in App Inventor – looking forward to Tutorial 11 🙂 !

  3. Israel Nemlich says:

    Hello Derek,
    I would like to thank you so much for your very high level quality tutorials.
    Is it possible to use appinventor for write/read data in mysql(etc), sqlite, using sql clauses. If yes, it would be awesome if you could cover it in a tutorial.
    How to build components for appinventor.
    Many thanks.

    • Derek Banas says:

      Hello Isreal,

      You can definitely read and write data to a web server running MySQL. I read from web services over the course of this tutorial and they could very well use MySQL on their end. I’ll definitely cover how to do this.

  4. Hey, I thought this was a awesome blog. Apreciate you sharing.

  5. ian says:

    I love these videos! I’m really confused by how to read the json lists generated by app inventor. Is there an easy way to figure out how to drill down and use the right indexes?

    For example, I’m trying to use this json data from weather underground but I’m pulling my hair out trying to display the right data (temperature forecast for monday and monday night, for example). Are there any tricks???

    ((forecast ((simpleforecast ((forecastday (((avehumidity 90) (avewind ((degrees 190) (dir South) (kph 2) (mph 1))) (conditions Partly Cloudy) (date ((ampm PM) (day 13) (epoch 1413252000) (hour 19) (isdst 1) (min 00) (month 10) (monthname October) (monthname_short Oct) (pretty 7:00 PM PDT on October 13, 2014) (sec 0) (tz_long America/Los_Angeles) (tz_short PDT) (weekday Monday) (weekday_short Mon) (yday 285) (year 2014))) (high ((celsius 28) (fahrenheit 83))) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (low ((celsius 14) (fahrenheit 58))) (maxhumidity 0) (maxwind ((degrees 0) (dir *empty-string*) (kph 22) (mph 14))) (minhumidity 0) (period 1) (pop 20) (qpf_allday ((in 0.0) (mm 0))) (qpf_day ((in null) (mm null))) (qpf_night ((in 0.0) (mm 0))) (skyicon *empty-string*) (snow_allday ((cm 0.0) (in 0.0))) (snow_day ((cm null) (in null))) (snow_night ((cm 0.0) (in 0.0)))) ((avehumidity 81) (avewind ((degrees 202) (dir SSW) (kph 26) (mph 16))) (conditions Mostly Cloudy) (date ((ampm PM) (day 14) (epoch 1413338400) (hour 19) (isdst 1) (min 00) (month 10) (monthname October) (monthname_short Oct) (pretty 7:00 PM PDT on October 14, 2014) (sec 0) (tz_long America/Los_Angeles) (tz_short PDT) (weekday Tuesday) (weekday_short Tue) (yday 286) (year 2014))) (high ((celsius 20) (fahrenheit 68))) (icon mostlycloudy) (icon_url http://icons.wxug.com/i/c/k/mostlycloudy.gif) (low ((celsius 14) (fahrenheit 58))) (maxhumidity 0) (maxwind ((degrees 202) (dir SSW) (kph 32) (mph 20))) (minhumidity 0) (period 2) (pop 20) (qpf_allday ((in 0.02) (mm 1))) (qpf_day ((in 0.0) (mm 0))) (qpf_night ((in 0.0) (mm 0))) (skyicon *empty-string*) (snow_allday ((cm 0.0) (in 0.0))) (snow_day ((cm 0.0) (in 0.0))) (snow_night ((cm 0.0) (in 0.0)))) ((avehumidity 76) (avewind ((degrees 249) (dir WSW) (kph 16) (mph 10))) (conditions Partly Cloudy) (date ((ampm PM) (day 15) (epoch 1413424800) (hour 19) (isdst 1) (min 00) (month 10) (monthname October) (monthname_short Oct) (pretty 7:00 PM PDT on October 15, 2014) (sec 0) (tz_long America/Los_Angeles) (tz_short PDT) (weekday Wednesday) (weekday_short Wed) (yday 287) (year 2014))) (high ((celsius 19) (fahrenheit 66))) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (low ((celsius 12) (fahrenheit 54))) (maxhumidity 0) (maxwind ((degrees 249) (dir WSW) (kph 24) (mph 15))) (minhumidity 0) (period 3) (pop 10) (qpf_allday ((in 0.0) (mm 0))) (qpf_day ((in 0.0) (mm 0))) (qpf_night ((in 0.0) (mm 0))) (skyicon *empty-string*) (snow_allday ((cm 0.0) (in 0.0))) (snow_day ((cm 0.0) (in 0.0))) (snow_night ((cm 0.0) (in 0.0)))) ((avehumidity 67) (avewind ((degrees 278) (dir W) (kph 16) (mph 10))) (conditions Partly Cloudy) (date ((ampm PM) (day 16) (epoch 1413511200) (hour 19) (isdst 1) (min 00) (month 10) (monthname October) (monthname_short Oct) (pretty 7:00 PM PDT on October 16, 2014) (sec 0) (tz_long America/Los_Angeles) (tz_short PDT) (weekday Thursday) (weekday_short Thu) (yday 288) (year 2014))) (high ((celsius 18) (fahrenheit 65))) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (low ((celsius 13) (fahrenheit 55))) (maxhumidity 0) (maxwind ((degrees 278) (dir W) (kph 24) (mph 15))) (minhumidity 0) (period 4) (pop 0) (qpf_allday ((in 0.0) (mm 0))) (qpf_day ((in 0.0) (mm 0))) (qpf_night ((in 0.0) (mm 0))) (skyicon *empty-string*) (snow_allday ((cm 0.0) (in 0.0))) (snow_day ((cm 0.0) (in 0.0))) (snow_night ((cm 0.0) (in 0.0)))))))) (txt_forecast ((date 6:31 PM PDT) (forecastday (((fcttext Partly cloudy. Lows overnight in the upper 50s.) (fcttext_metric Partly cloudy. Low 14C.) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (period 0) (pop 20) (title Monday)) ((fcttext Partly cloudy skies early will give way to cloudy skies late. Low 58F. Winds SW at 5 to 10 mph.) (fcttext_metric Partly cloudy this evening with more clouds for overnight. Low 14C. Winds SW at 10 to 15 km/h.) (icon nt_partlycloudy) (icon_url http://icons.wxug.com/i/c/k/nt_partlycloudy.gif) (period 1) (pop 20) (title Monday Night)) ((fcttext Mostly cloudy. High 68F. Winds SSW at 10 to 20 mph.) (fcttext_metric Mostly cloudy. High 19C. Winds SSW at 15 to 30 km/h.) (icon mostlycloudy) (icon_url http://icons.wxug.com/i/c/k/mostlycloudy.gif) (period 2) (pop 20) (title Tuesday)) ((fcttext Cloudy skies. Low 58F. Winds SSW at 10 to 15 mph.) (fcttext_metric Cloudy during the evening. A few showers developing late. Low 14C. Winds SSW at 15 to 25 km/h. Chance of rain 40%.) (icon nt_cloudy) (icon_url http://icons.wxug.com/i/c/k/nt_cloudy.gif) (period 3) (pop 20) (title Tuesday Night)) ((fcttext Partly cloudy skies. High 66F. Winds WSW at 10 to 15 mph.) (fcttext_metric Partly cloudy skies. High 19C. Winds WSW at 15 to 25 km/h.) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (period 4) (pop 10) (title Wednesday)) ((fcttext Partly to mostly cloudy. Low 54F. Winds NW at 5 to 10 mph.) (fcttext_metric Partly cloudy early with increasing clouds overnight. Low 12C. Winds NW at 10 to 15 km/h.) (icon nt_partlycloudy) (icon_url http://icons.wxug.com/i/c/k/nt_partlycloudy.gif) (period 5) (pop 0) (title Wednesday Night)) ((fcttext Partly cloudy skies. High around 65F. Winds W at 10 to 15 mph.) (fcttext_metric Considerable clouds early. Some decrease in clouds later in the day. High 18C. Winds WNW at 10 to 15 km/h.) (icon partlycloudy) (icon_url http://icons.wxug.com/i/c/k/partlycloudy.gif) (period 6) (pop 0) (title Thursday)) ((fcttext Considerable cloudiness. Low around 55F. Winds SSW at 5 to 10 mph.) (fcttext_metric Considerable cloudiness. Low 13C. Winds SSW at 10 to 15 km/h.) (icon nt_mostlycloudy) (icon_url http://icons.wxug.com/i/c/k/nt_mostlycloudy.gif) (period 7) (pop 10) (title Thursday Night)))))))) (response ((features ((forecast 1))) (termsofService http://www.wunderground.com/weather/api/d/terms.html) (version 0.1))))

    • Derek Banas says:

      Thank you 🙂 Sorry, but it will require a lot of trial an error to figure everything out. You’ll basically have to use the same technique I used in these videos. Sorry I couldn’t help more then that.

Leave a Reply

Your email address will not be published.

Google+