I am still trying to find the "correct" design pattern when dealing with AsyncTask
s and screen rotation. I read this commonsware blog post which links to this code, but the onRetainNonConfigurationInstance method is now deprecated. The magic sentence in the documentation states "The guarantee of no message handling during the switch to the next activity simplifies use with active objects..." which is a truly critical part about what this method did. I don't see its suggestion of using setRetainInstance() being able to accomplish the same goal.
I also saw posts such as this one whose number one answer is really nothing short of a bad hack which only covers 90% of use cases (ie. what happens if your task is running and then a phone call comes in, that solution will not work).
It was suggested to review the code here for AsyncTask examples but unless I am being dense, I don't see them being used anywhere in the application (when using the search feature on google code)
This question has obviously been asked many times but I have not seen an up to date, proper asnwer. If one exists, please answer and close as duplicate if you must, but at least answer! :)
This is another link which reviews the same, deprecated method.