I have an Android
application which retrieves information from the web using an AsyncTask
. The main Activity
has a model object, and the AsyncTask calls a method on this object to go and retrieve the data. While this is going on, the main Activity fires off a ProgressDialog
. As you can imagine, this was not implemented with orientation changes in mind. I know I can save the model object instance away using the onRetainNonConfigurationInstance()
method. But what do I do with the ProgressDialog
? Can I save that away in the same method? Should I destroy it and recreate it? Or should I do a 3rd thing?
Quick Edit: While I'm on the topic, have any of the Android Engineers actually commented on the proper way to do this?