Hacker News new | past | comments | ask | show | jobs | submit login

That seems to go against the documentation: (https://developer.android.com/guide/components/services.html)

> A started service must manage its own lifecycle. That is, the system does not stop or destroy the service unless it must recover system memory and the service continues to run after onStartCommand() returns.

A started service shouldn't be killed randomly - after all, that's how the downloads are handled - you don't see those disappearing without a reason.




Downloads are generally handled via foreground services (one significant difference is that foreground services show up as an icon in your notification area, notice downloads or Play Store updates appear there?). Background services are more like OLE in the sense of they let you set your app up so another app can ask it for stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: