android - When I close the Activity the service is killed then started again -


i have simple android program containing 1 activity , 1 service. starting service activity calling: startservice()

the service should continue running when close activity started calling startservice. noticing when close activity service killed started again after short time.

is normal behavior in android? if normal, there way enforce keeping exact service running?

thank rami

how "closing" activity? there's no need kill activity once you're finished using it, , service should keep running if activity in background.

service.ondestroy() called before system destroys service. however, inclined believe have different problem, since it's unusual service killed unless device low on memory.


Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -