If I need to download some data asynchronously via HTTP (or something else) to update the user interface, I have several options when writing an Android application (among many others that I'm sure I skipped):
From what I understand, IntentService is not tied to the Activity lifecycle, so any orientation changes, etc. will not affect data retrieval. If this does not apply to AsyncTask or a thread running inside an Activity.
The reason for the question is that I recently read about Loaders and are confused about their application. They seem to be more closely related to the data source, where if the data source changes, then everything is “transparently” processed accordingly. Loaders also seem tolerant of configuration / orientation changes (I believe).
I am currently using IntentService to make RESTful service calls and translate the results that will be received by the corresponding actions.
I suppose I can write an HTTP downloader, but I'm not sure if this is the best way to use this mechanism.
What are the advantages / disadvantages of using one of the async data loading methods for any other?
android
Steve
source share