[android-developers] Re: PendingIntent getService

2012-04-19 Thread ndiiie90
thx for reply Mark, however, we can still finish it manually by
calling stopSelf() method in the service

On Apr 18, 7:52 pm, Mark Murphy  wrote:
> On Tue, Apr 17, 2012 at 10:13 PM, ndiiie90  wrote:
> > so did you mean that I don't need to stop it because you said that
> > "which automatically shuts down when it is done processing the
> > delivered command" ?
>
> IntentService automatically stops itself once onHandleIntent() ends
> (assuming no further commands were sent to it during onHandleIntent()
> processing).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: PendingIntent getService

2012-04-18 Thread Mark Murphy
On Tue, Apr 17, 2012 at 10:13 PM, ndiiie90  wrote:
> so did you mean that I don't need to stop it because you said that
> "which automatically shuts down when it is done processing the
> delivered command" ?

IntentService automatically stops itself once onHandleIntent() ends
(assuming no further commands were sent to it during onHandleIntent()
processing).

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


[android-developers] Re: PendingIntent getService

2012-04-17 Thread ndiiie90
so did you mean that I don't need to stop it because you said that
"which automatically shuts down when it is done processing the
delivered command" ?


On Apr 17, 6:02 pm, Mark Murphy  wrote:
> On Tue, Apr 17, 2012 at 5:59 AM, ndiiie 90  wrote:
> > according to here:
> >http://developer.android.com/reference/android/app/PendingIntent.html...
>
> > Retrieve a PendingIntent that will start a service, like calling
> > Context.startService()
>
> > However, i am doubt. Must we stop the service?
>
> Something must stop the service.
>
> > If yes, how to do it?
>
> Typically, I find that a getService() PendingIntent is used with
> IntentService, which automatically shuts down when it is done
> processing the delivered command.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en