Advanced AsyncTask and Progress Dialogs
In many Android applications, you will need to perform work behind the UI in a separate thread. While the work is going on, you might want to display some sort of progress indicator to the user. While it is possible to create your own threads, manage them, and coordinate UI updates from your thread, Android provides a couple of classes that take care of a lot of this for you automatically. Then you can focus on the actual work that you want to do, instead of the code for threads and messaging to the UI. The classes that do this are AsyncTask and ProgressDialog.
This chapter will start with the basics of an AsyncTask and move to the code needed to present progress dialogs and progress bars that ...