On Wed, Oct 24, 2012 at 12:46 AM, Live Happy <livehap...@gmail.com> wrote:
> I have a service in my application but this service stop working after time
> and i want to keep the service keep working without stopping and for that i
> try to start the same service from onDestroy method when it dieing but its
> not work even the written log not appear ,so  it is possible to call the
> service from itself and if it  not may i create another service who do the
> same work and they call each other when one of them stopped, so when in
> onDestory i cant call it so how to call it?, wish that someone can help me
> with this situation thx on advance

Have you tried returning START_STICKY in onStartCommand() of the
service. It is supposed to keep the service running till user
explicitly stops the service.

Ref: 
http://developer.android.com/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29
-Subodh
>

-- 
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

Reply via email to