I would say your idea of downloading all files at the same time is flawed... one at a time would be better. I'd queue up the files to be downloaded and download one at a time. First off, whether all 20 come at the same time, or 1 at a time, you're not going to get them done any faster since they would be 20 separate downloads anyway. I'd imagine that even 1 download may fill up the 3G bandwidth.. depending on signal strength and speed of the server you are downloading from. Also, have you considered what happens if all 20 downloads get halted right in the middle? You'll have to restart them again (unless you have some check/resume logic in place). If you download one at a time, and the operation halts, it will halt between one file, not potentially all of them. This way, you might have already received a few files and if you continue, only need to download the rest, not all 20 again.
You would still do this with AsyncTask. On Wed, Jan 13, 2010 at 4:24 PM, Mark Murphy <[email protected]>wrote: > Nathan wrote: > > Can AsyncTask be started on another thread? > > Yes. > > > I also wonder, though, if the AsyncTask takes into account that each > > task might be running an HttpRequest since it is for general purpose > > threaded. I can foresee running out of HttpRequests before running out > > of threads, if there is a practical limit. > > You don't *want* many threads. Remember: this is a mobile device, not a > Web server. RAM is not on your side. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > Android Consulting/App Development: http://commonsware.com/consulting > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

