You can call isChangingConfigurations()
in onDestroy()
on API Level 11 and above. You can refer to this post, How to distinguish if activity is changing configurations.
Maybe you should take another approach. I think you should use a IntentService
(which runs in background, no more need for AsyncTask
), use that service to retrieve & store data, and then notify the Activities
that the data is updated, using a Broadcast
maybe.