INQ241B
Mobile Apps

Activity 17

Stock Quotes

In this activity you will create an App that displays the current value of a company’s stock given its ticker symbol.

  1. Create a new app that displays a text box with a button next to it like the following:

    stock1
  2. When the user taps the button, the app should display the current stock price for the ticker symbol in the text box, like the following:

    stock2
    The app should use the web->download function to download the the web page:

    http://finance.yahoo.com/q?s=xxxx

    where xxxx is the ticker symbol of a company. Use the string index function to find the location of the stock price in the web page’s HTML and use the substring function to extract the stock price from the web page’s HTML.

Submission

Please show your source code and run your scripts for the instructor or lab assistant.