After reading a few articles about Android configuration, I still don’t know how to NOT launch an async task when I change the view from portrait to landscape. I load some information from the server, and it will be not wise to load it every time I rotate my phone. I want to load it once. Can I do that without adding ‘changeConfig’ flag in Manifest file?
After reading a few articles about Android configuration, I still don’t know how to
Share
1 Make your AsyncTask a private instance variable of your class (has to be declared as a static inner class or as a separate file).
2 Return your AsyncTask instance in
onRetainConfigurationChanges()3 Retrieve it in
oResume():