Unlike previous versions, in 4.4, swiping app out of recent tasks permanently kills app along with its service(like force-stop) even though it's running background services. It shows 0 processes 1 service but service also doesn't work. Ideally it shouldn't kill background service, and it doesn't in versions prior to 4.3. Any idea why is it happening in 4.4?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
From this issue Foreground service killed when receiving broadcast after acitivty swiped away in task list
Here is the solution
In the foreground service:
In the manifest:
In DummyActivity.java:
Got it. Its a bug in 4.4. I tried this and it worked perfectly fine(its a dirty workout though).
Just override this method -: