Homework required in preparation for this lecture (1.5 hours estimated time, and 2 hours on PA4 and incubator )
- Read Chapter 7 (pp. 130-160) and get the LocalBrowser and Translate applications running on your phone or other device (look up code via googling "hello android pragmatic" and downloading the code). These applications demonstrate critical concepts and techniques which you will use in your incubator projects. Make some superficial modifications to the code (e.g. add your name to the UI somewhere) and create a short screencast showing your modifed code running in the simulator (or make a movie of it running on your phone or other device) [1 hour reading @ 2min/page, 30 minutes downloading and modifying code, 10 minutes making/posting video]
- Write a short blog post explaining what you thought were the most subtle concepts in this Chapter, be prepared to explain any features that you didn't feel were particularly subtle! [15 minutes]
Also spend at least 1 hour
working on PA4 and at least 1 hour
to complete at least one story for your incubator project.
- understand how to design an android application that interacts with a web service
Main topics to cover. We will use a code review approach where students will be called on (randomly) to explain parts of the code in Chapter 7. LocalBrowser
- WebView class where is it created and where does it appear in the application?
- how would you create a multipage website with photos and links?
- how is this done in this example?
- what kind of changes could we make to this code
- how is this done in this code?
- what kind of changes could we make
Work through example of Translation app showing how to communicate with a server. We will also read this code closely and make sure everyone understands what it does.Translation App Key Ideas:
- How are the lists of languages generated in the GUI
- related question -- what are Adapters and Spinners
- How does the application continuously read from the keyboard and make translations in real time?
- what is the Executor class and why is it being used? are there alternatives?
- why is there a 1000ms delay
- why do they use the Handler class? are there alternatives?
- What if we didn't want to have continuous translation? Would we still need threads?
PA2 code examples
- Work on Incubator Projects, verify story priorities with clients
- Discuss Homework for tomorrow