Do not stop service if task removed : #1783#1784
Conversation
|
Thanks @brvier for the pull request. Could you elaborate why this is needed? |
|
Why commenting it ? Bad habits. I don't understand why you want killing service and testing it when app is closed. One example, if you have a Bluetooth connection in your service, you lost it, need to rescan, which could not be done at any moment in a background service, especially on some devices which prevent Bluetooth scan in background. All other background service do the same. I'll found other example and try to understand why this was introduced in #1374 |
From my own tests if the system kills the app at any point to preserve battery the service will actually continue to run. From this it appears that this service stop only happens if the user explicitly stops the app either via some integrated button calling And isn't it kind of expected that everything stops when the user shuts down the app explicitly? Can you elaborate why you would want to not have that happen? |
Not exactly, you should close user interface, but you should also keep background service communicating with external device working. There are many example of service running in background while user kill the app but it s mandatory to keep a permanent notification :
There are many examples :) |
|
In our app, we are trying to have a service that runs in the background regardless of user interaction. Can we get this merged? |
Comment the stopSelf(); in onTaskRemoved.