Downloading file and asynctask opinion needed

by Mystique » Fri, 07 Jan 2011 13:02:17 GMT


Sponsored Links
 Hi, in my app I have an asynctask to download a file but the file size
is only 50kb so it is almost instantaneous. Is worth worth to put it
on async? Or I'm asking for trouble and should keep it simple?

-- 



Re: Downloading file and asynctask opinion needed

by TreKing » Fri, 07 Jan 2011 13:04:43 GMT


 



How fast is it when there's little or no network connection?

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Re: Downloading file and asynctask opinion needed

by Marc Lester Tan » Fri, 07 Jan 2011 13:05:49 GMT


 Yes, i think it's still better to keep it in asynctask as you will never
know when the user is in high speed mobile internet or not and also not to
block the ui thread.

Marc





-- 



Re: Downloading file and asynctask opinion needed

by Frank Weiss » Fri, 07 Jan 2011 13:07:24 GMT


 I suggest using AsyncTask for that, but keep it in the activity instead of a
service.

-- 



Re: Downloading file and asynctask opinion needed

by Mystique » Fri, 07 Jan 2011 13:54:04 GMT


 Thank you all. I will keep it that way :)

-- 



Other Threads

1. Default the Spinner Selection

I feel almost embarrassed to ask this.. But how do you default the
selection in a Spinner Widget? I have a Spinner that uses an
ArrayAdapter<String> to fill the Selections. I get the value of the
Spinner from a database, and now I want to set the Spinner to that
selection when the user creates the Activity..

This seems like it should be simple, but I just don't see a method to
do this??

Thanks,

LA
--~--~---------~--~----~------------~-------~--~----~

2. Webbrowser in emulator does not work (proxy issue?)

Hi.

I am using the internet on campus here, which in general allows TCP/
UDP connections on various ports without problems. However, for a few
specific ports, I am forced to use a proxy (the ones I know of are for
example port 80 for HTTP).

Anyways, I am not able to open any webpages (or google maps) in the
Android emulator. Setting the "-http-proxy" variable seems to have
been recognized (I get a line in the console in Eclipse saying that
the given HTTP proxy has been set up) but the webpages still won't
open.

Apart from that I do have the possibility to tunnel the whole internet
traffic through a SOCKS 5 proxy server which allows me to also use
programs that connect using port 80 directly. I use a program that
does the tunneling on OS (operation system) level, so basically any
connection attempt done by any running program goes through that
proxy. So do the connection attempts of the emulator. However, the
browser inside the emulator still claims that there is no connectivity
and doesn't open any webpage.

Firewall is disabled, so this is not the issue either.

I know that you will need more information. Is there a way I can give
you any? Like .. I dunno, extreme level of detail of debug why the
emulator thinks it doesn't have an internet connection?

Any other tipps?

Thank you,
NameZero912

--~--~---------~--~----~------------~-------~--~----~

3. use ACTION_WEB_SEARCH

4. ContentProviders and Security of SQL Snippets

5. Port SDL/TinySDGL to android with native C

6. WiFi Ad-hoc networks in android?

7. Location Providers