[android-developers] Re: Which Android service path to choose for implementing a large upload?
Thanks -- I was able to use IntentService and it works well. Although it hangs my program while upload. I'm not sure why it does since it is supposed to be uploading in a separate thread -- but I think I'll do some searching around to see what I can do. On Jul 19, 3:58 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 19, 2010 at 2:32 AM, MB manoj.bi...@gmail.com wrote: What do you mean by an IntentService? IntentService is a class in the Android SDK: http://developer.android.com/reference/android/app/IntentService.html IntentService implements a service with a background thread and work queue. A singleton object running a Thread would be easier to implement and would probably port out of the box on other java based platforms. Please do not do this. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Which Android service path to choose for implementing a large upload?
What do you mean by an IntentService? A singleton object running a Thread would be easier to implement and would probably port out of the box on other java based platforms. However it would have the following drawbacks: - Android only treats Activities and Services as components. So if you are using a singleton object to do the grunt work, your process would become a candidate to be killed with higher probability in low memory conditions. - Notifications require a Context in android. So a singleton object would not be able to issue notifications. I would suggest using a Service. On Jul 17, 5:20 pm, Frank Weiss fewe...@gmail.com wrote: My suggestion is to look at some sample code, like Romain Guy's PhotoStream. Although PhotoStream does a Flickr download instead of an upload, the application structure covers services, AsyncTask (albeit an early version thereof), notifications, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en