Threaded Download Started Service Demo (Assignment 4)


This assignment builds upon the various Android concurrency models from the third assignment to give you experience using an Android Started Service to download bitmap images from a web server and display them via an Activity. This Activity has a similar interface as in assignment 3 and works as follows:

Note that the results will look somewhat different if you use a real Android smartphone vs. using the AVD emulator shown in the screenshots above.

Program Description

This assignment involves writing an Android program that has the following features:

The entire layout of the application must be structured by the contents of the Android resource files described via XML, i.e., you must not hard-code any TextView, EditText, or Button objects into your DownloadActivity class.

Skeleton Code

The following code is intended to give you some ideas of how to structure your program based on the solution I wrote. When in doubt refer to the programming assignment description above. Feel free to change this skeleton code if you have a better solution and/or submit fixes for any problems. In particular, you should refactor the code so that as many methods as possible are located in a Utils class.

Concluding Remarks

This programming assignment is more complicated than the previous one since you'll need to figure out how to pass responses back from the Service process(es) to the DownloadActivity process. There's a great deal of useful information on Android Services available on the web, but make sure not to blindly copy and paste it..

Back to CS 282 home page.