It depends on the Service which you have. Service in android is of two types: Bound Service and Unbounded Service. Binded Service is what is bound to the activity and it lives as long as activity is running. But unbound service is like a *Separate Process. The Service can still be killed by Android.*To avoid this in the onDestroy() method just call the BroadcastReceiver which launches the service.
On Tuesday, November 25, 2014 4:38:18 PM UTC+5:30, Oleksii Bieliaiev wrote: > > Hey guys, > > let's imagine we have an app with a service and an activity inside. Both > components live in a same process, our service is started (in terms of > Android) and a user does some interaction with an activity. Eventually our > app goes to background. My question is, whether is it possible, under > certain conditions (low memory, timeout, etc), that Android "kills" our > started service separately, without killing entire process? > > Thank you, > Alex > -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.