I have been reading around on internet connectivity with Android and noticed there are different ways to handle this i.e. AsyncTask and IntentService. However, I\'m still no
As mentioned above AsyncTask
will solve your problem.
But Keep in mind that AsyncTask
has an important weakness: it doesn't handle well Activity
"refresh" (eg during rotation). It may be a problem if, e.g., user rotate the phone while your AsyncTask
is still loading stuff. If this is indeed a problem for you I recommend AsyncTaskLoader
:
http://developer.android.com/reference/android/content/AsyncTaskLoader.html