What happens to AsyncTask if activity is destroyed?

What happens to AsyncTask if activity is destroyed?
Answer
If you start an AsyncTask inside an Activity and you rotate the device, the Activity will be destroyed and a new instance will be created. But the AsyncTask will not die. It will go on living until it completes. And when it completes, the AsyncTask won’t update the UI of the new Activity.
 

Tìm kiếm

Back
Top