Building an Android service that never stops running

Roberto Huertas
Jun 29 · 4 min read

The problem

It’s all about Foreground Services

Show me the code

Adding some dependencies

Writing our service

Time to deal with the Android Manifest

Can you tell me how I start the service?

Bonus: Start the service on Android boot


Roberto Huertas

Rust, TypeScript, Flutter and others

Roberto Huertas

Written by

A Barcelona-based web & mobile developer wandering through cyberspace. Organizer of @bcnrust. Currently working at Telefonica Alpha.

Roberto Huertas

Rust, TypeScript, Flutter and others