The ProgressDialog class
Sets up the progress dialog with the desired title, and message. Does not show it until the show method is called.
Close the dialog.
This method is called if there is an error when showing the progress dialog.
Set the percent of the progess bar. Will close on 100.
Shows the progress dialog. Will run the callback in a thread and block until it is closed or percent reaches 100.