tags:

views:

35

answers:

2

As i understoond, if we have local service of some application, as soon as the application goes down, the service goes down as well - is that true?

and if it is, how can we make an application to run all the time without go down? (without using Alarm manager). i though that the purpose of local service is to answer this situation: " to make the application everlasting"

please, if some1 could explain me this better, thanks,

ray.

A: 

That is incorrect. BackgroundServices(like Google Maps Navigation/Music Player) are intended to never be killed by the system.

BrennaSoft
That is incorrect. Background services (e.g., service powering the music player) may get killed by the system. Ones directly impacting the user (e.g., music) are less likely to be killed than those that are purely background (e.g., polling some Web site).
CommonsWare
+1  A: 

how can we make an application to run all the time without go down?

You can't.

i though that the purpose of local service is to answer this situation: " to make the application everlasting"

Absolutely not. Services can run for a while, but they can be:

  • Closed by the user via the Running Services screen in Settings
  • Closed by the user via a task killer
  • Closed by Android to free up memory in times of need
CommonsWare
I dont care if they will be closed by the user, what i wanna know is, local services might be closed by the system, exaclly as the app which belong to them could?
rayman
Please look at http://stackoverflow.com/questions/2727743/should-i-use-remote-or-local-service-for-this-scenariothis is my reason for asking, i need that listener to be up without being killed by the system, if its being killed by the user then it;s less important to me.thanks.
rayman