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. SharedPreferences bug when writing strings with ampersands in them

Done.

Here's a link to issue in case anyone is interested.

http://code.google.com/p/android/issues/detail?id=2167&q=SharedPreferences&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary

I think for now in our app we'll just preprocess these strings to
encode and decode the ampersands ourselves (avoiding the use of & of
course) when we put them in and out of the settings.

Cheers
Chris.





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

2. Reconnecting to a service

This may be a easy question but I have a application that runs a
service using:

startService()

The service works great but my questions is how do I reconnect to this
service if I close my front end app by clicking the home button, then
re launch the app?  Thanks to anyone that can help.


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

3. String to "HTML String"

4. Change CharSet

5. Permission Denied Error

6. Webview and language support

7. why print android_power:wakeup and didn't boot?