I implemented an AsyncTask
in my app and encountered exceptions like IllegalArgumentException
. I asked question on stack overflow somebody said I shouldn't use AsyncTask
in apps for the following reasons.
I was recommended Robospice and also told consider this thread AsyncTask
is not really the best tool to create network requests on Android. use RoboSpace
Can anybody tell me what is best option to use access network asynchronously? What should I use AsyncTask
or RoboSpice?
According to this guy at Google IO, using AsyncTask for networking is not the way to go. He may give his presentation with an annoying & condescending tone, but nonetheless has some good points.
IMO the leading libraries to use are android-async-http and robospice.
DISCLAIMER: I haven't tried either of these yet. While I like the API of android-async-http better, it seems like Robospice was more recently developed and supports better libraries.
I may end up rolling my own that extends IntentService
.