Introduction
In the previous chapter, we learned how to request permissions from the user and use Google's Maps API. With that knowledge, we obtained the user's location and allowed them to deploy an agent on a local map. In this chapter, we will learn how to track a long-running process and report its progress to the user.
We will build an example app where we will assume that Secret Cat Agents (SCAs) get deployed in a record time of 15 seconds. That way, we'll avoid having to wait for very long before our background task completes. When a cat successfully deploys, we will notify the user and let them launch the app, presenting them with a successful deployment message.
Ongoing background tasks are quite common in the mobile world. Background tasks run even when an application is not active. Examples of long-running background tasks include the downloading of files, resource cleanup jobs, playing music, and tracking the user's location. Historically, Google...