[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component,

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component,

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component,

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Oleksii Bieliaiev
Found some info here http://stackoverflow.com/questions/8087596/when-service-is-killed-can-the-process-be-still-alive?lq=1 On Tuesday, November 25, 2014 12:08:18 PM UTC+1, Oleksii Bieliaiev wrote: Hey guys, let's imagine we have an app with a service and an activity inside. Both

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-05 Thread Oleksii Bieliaiev
Didn't find reliable answer yet :( On Tuesday, November 25, 2014 12:08:18 PM UTC+1, 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

Re: [android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-05 Thread Kristopher Micinski
I think the answer to your question is no: it wouldn't be that helpful from a memory footprint perspective to simply kill the service: memory allocation happens at the process level. For this to be useful, the service would have to be killed out in some heuristic way, then some GC would have to

Re: [android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-09 Thread Oleksii Bieliaiev
Hi Peter, thank you for your reply. However, please read my question carefully. I'm asking about a specific case, when Android OS kills a SERVICE (an application component) separately, without killing entire PROCESS. Please check your own links. You pointed at final void

Re: [android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-09 Thread Oleksii Bieliaiev
Hi, please, read my question carefully. I'm asking about a specific case, when Android OS kills a SERVICE (an application component) separately, without killing entire PROCESS. You are talking about the case, when Android OS kills entire background PROCESS, because it has low priority compared

Re: [android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-08 Thread Peter Teoh
*The Service can still be killed by Android.* Any proofs? not any proofs, but just some discussion is possible: Read this: http://developer.android.com/reference/android/content/Context.html#startService%28android.content.Intent%29 From above, there is a line: The only time they should be

Re: [android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-08 Thread gjs
Hi, You can prove this yourself by creating a test app with a service running a few tests. Run the test app start the service on a recent device with Android V4+ then leave the service running go do other stuff for a while. Sometime during the next few hours you probably find that your

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-05 Thread Ashik Vetrivelu
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-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-05 Thread Oleksii Bieliaiev
It depends on the Service which you have. Service in android is of two types: I'm asking specifically about Started service http://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent) *The Service can still be killed by Android.* Any

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2014-12-05 Thread Johan Appelgren
What? Whether a Service runs in a separate process or not DOES NOT depend on whether you bind to it and/or start it using startService. That is only controlled by the process attribute, see http://developer.android.com/guide/topics/manifest/service-element.html#proc. On Friday, December 5,