|
|
Day 5: Adding Real Functionality<< Back to Tutorial Home - < Back to Day 4 - Forward To Next Steps > Well, we've done just about everything except for actually making the application DO something. Well, now's the time. We're going to make some changes to our ViewScreen class -- some fairly extensive ones, actually. I'm going to explain the changes here, and I'll link in the source, since the changes are too big to really be practical showing here. What It DoesWe'll use some traffic cameras from Colorado Springs, CO.
We're going to choose 4 of these cameras, then rotate through them every 6 seconds. Changes to ViewScreen & Other Details
Download ViewScreenDownload the updated version of ViewScreen.java and replace your copy of it with this one. Run ItRun it in the Simulator. Select 'View Traffic Cameras' and you should see something like this set of screens rotated through:
etc. Problems?If you get an exception, double-check the URLs listed; if this tutorial has been out for a while, they might have changed some of the URLs for the images. Right now, the code just throws an exception or otherwise misbehaves. Paste each into your browser, and simply comment out any that don't work. That's It!!!Congratulations -- you have successfully written a complete TiVo application that actually does something useful. I hope this has been useful. I'm sure you have lots of ideas of how to improve the application from here. Go to the Next Steps for a list of possible improvements, adn to download a completed, commented version of this project. << Back to Tutorial Home - < Back to Day 4 - Forward To Next Steps > |