Skip to main content


Showing posts from March, 2019

Background services for Android, updated

If, like me, you've needed to set up and run a background service on Android before, these scenarios might make you shiver:
Creating Activities that can quickly and easily request a set of permissions.Binding those Activities to a Service, and then disconnecting them without shutting it down.Bringing the service to the foreground, and keeping it alive for as long as possible.Managing the Service lifecycle, as Android tears your service down and brings it back to life as and when it needs to.Communicating between entirely different processes/apps. A few years ago I wrote a library called background-service-lib to help smoothe over these exact pain-points. Android moved on, as did Android Studio and Gradle, and so I've refreshed it again.

You can find out more about how to use version 2.0, and how to include it in your projects at the Github repository:
front-line-tech/ background-service-lib