When an application process is killed all threads of this process are
also killed. If killed application doesn't have a service a new
process of this application wont start. But if killed application has
a service a new process will start and service will be recreated. Does
returned value of onStartCommand() influence on this situation?

On 27 июл, 16:39, Droid <[email protected]> wrote:
> The service is on some type of thread which you have not killed. As
> far as I remember you have to use a cancel() service commnand in the
> java code.
>
> They can be hard to stop if you don't.
>
> On Jul 27, 12:58 pm, "m.andrew" <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi!
>
> > I have an application with an activity and a service. The service is
> > started by startService() and the activity is bound to it. The
> > overridden onStartCommand() method returns START_NOT_STICKY. So I
> > suppose that service will not be recreated if it's killed. But it
> > will.
>
> > I kill the application process by the command: adb shell kill <pid>.
> > After killing the process the log shows that new process of my
> > application is started again and the service is recreated.
>
> > So my question is: Why does Android restart this service (the killed
> > process)?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to