Wednesday, February 23, 2011

Re: [android-developers] Re: Service Lifecycle

On Wed, Feb 23, 2011 at 10:30 AM, Jake Colman <colman@ppllc.com> wrote:
> An "IntentService" as opposed to what?

As opposed to a Service. IntentService is a class.

> Feel free to tell me RTFM and
> point me to the right place.

http://developer.android.com/reference/android/app/IntentService.html

> How
> do I set up the service "to do a little bit of work, then get the heck
> out of RAM"?  I have the "little bit of work" part down pat since the
> service does seem to do its job.  But what else are you suggesting?

IntentService has two key features:

1. You do your work on a background thread, not on the main
application thread, with the thread being managed by Android.

2. The service shuts down (via stopSelf()) when there is no more work
to be done.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate