The BackgroundProcessService class

The BackgroundProcessService class is the Android service that will be running while our isolate is being executed. As it is in the background, the application may be closed and the isolate will be running normally.

Again, it is important to check the Android Service documentation mentioned before to understand how the life cycle works.

Service execution is all managed by the Android system; we do not have full control of it, so we need to react to events provided by the system to execute our isolate based on the Service state.

It all starts with the onCreate method, when the system creates our Service method and we can set up all of the resources needed for it to run. It is a good place to start our background ...

Get Flutter for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.